Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8430187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:32:24+00:00 2026-06-10T05:32:24+00:00

I tried to use the function lsqcurvefit to find p and q parameters for

  • 0

I tried to use the function lsqcurvefit to find p and q parameters for Bass Diffusion Model.

At first I wrote Bass function the following way:

function F = Bass(x, cummulativeAdoptersBefore)
m = 1500000;

F = x(1)*m + (x(2)-x(1))*cummulativeAdoptersBefore + x(2)/m*cummulativeAdoptersBefore.^2;
end

x(1) = p
x(2) = q

and then FitBass:

function [ x, resnorm ] = FitBass(priorCumulativeAdopters, currentAdoptersCount)

    xData = priorCumulativeAdopters;
yData = currentAdoptersCount;
x0 = [0.08; 0.41];
[x, resnorm] = lsqcurvefit(@Bass, x0, xData, yData);
end

But when compared the results F = Bass(x, cummulativeAdoptersBefore), where x is the vector of matched parameters and yData which is actual data, I noticed that the F (the lower curve – x ~ 1) is not even similar to yData:

Does anayone know what could be wrong here or how to find the parameters x for satisfactory fit in this case (and in general)?

Thank you!

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:32:26+00:00Added an answer on June 10, 2026 at 5:32 am

    For gawds sake, why not just use simple linear regression? 🙂 Throwing a nonlinear fit at this is like using a Mack truck to take a pea to Boston. This is a simple quadratic polynomial.

    n(t) = pM + (q-p) N(t) -q/M (N(t))^2
    

    Combine terms.

    n(t) = p*(M - N(t)) + q*(N(t)-(N(t))^2/M)
    

    See that p and q are linearly estimable coefficients. Assuming that your data falls in a pair of column vectors, solve for p and q like this…

    N = priorCumulativeAdopters;
    m = 1500000;
    pq = [M-N, N - N.^2/M]\currentAdoptersCount;
    

    pq will be a column vector of length 2.

    Having said this, expect to see potential numerical problems, as there appears to be a scaling issue.

    M is 1.5e6, and the vector of priorCumulativeAdopters appears to be scaled in the interval 0 to 16. See what happens when you subtract N from M. So don’t be surprised if there is a problem, and you come running back, telling us there is a problem. I already expect you’ve got something screwed up. I’ll guess this is why you got a poor fit before.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried to use the following function in order to set the div's position
In the following example, I tried to use uninterpreted Boolean function like (declare-const p
I tried to use dat.GUI in the following three.js example . I just did
I tried to use the function called NTCreateFile . When I compiled it gave
I tried to use this function $conn = db_connect(); while ($newsfeed = $conn->query(select info,
I need to use function image_path in my lib class. I tried this (and
I'm learning GLSL. I tried to use a function glCreateShader. but there is no
I tried to use the update function with onunload but the function wasn't invoked.
i tried to use these mysql function for persian date i got this error
I've tried to use the PHP function getimagesize , but I was unable to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.