Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to calculate innovation and imitation factor by ovserving the usage of specific service among the population.

After going through an overview of the paper I wrote the fuction in matlab:

function F = Bass(x, inputData)
m = 364426;
inputData( inputData(:,1)==0 )= 1;
cummulativeAdoptersBefore = inputData;
F = x(1)*m + (x(2)-x(1))*cummulativeAdoptersBefore + x(2)/m*cummulativeAdoptersBefore.^2;

where x(1) = innovation factor and x(2) = imitation factor

In order to determine x(1) and x(2) I created a fuction which is supposed to solve least squares curve fitting:

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

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

but the problem is that for some (real) data it returns negative imitation factor and the curve doesn't fit well during the peak period.

Below is the comparison of real and predicted data using the functions above:

Comparison of real and predicted values

By observing the shape of the curve, the real data seems to correspond to bass model: enter image description here

but I guess the predicted data should be similar to actual throghout whole observed period, not just the end.

Does anyone know how to correctly determine the innovation and imitation factor use them in prediction model?

Thank you!

share|cite|improve this question

Looking at your graphs, I would guess the problem comes from the early high peak. That is driving the number of innovators up. Then the steep fall is causing the number of imitators to be negative. Your basis functions do not allow you to reproduce the data. One way to test this assertion would be to make up some data sets that look much more like your basis functions. For example, take 1000 innovators and 10000 imitators, calculate the distribution, add some noise, and try your fit.

I can't read the code you post. Usually your function Bass would take in the current time, number of innovators, the number of imitators, maybe a time scale for each, and return a number of new adopters. Usually a least squares fit would use data series, but xData and yData look like single numbers.

share|cite|improve this answer
xData = prior Adopters, yData = new Adopters in observed period and both are vectors. – niko Aug 31 '12 at 18:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.