How to caculate a bass model.
Show older comments
y=m*(1-exp(-(p+q)*x))/(1+(q/q)*exp(-(p+q)*x))
x=1:8
y=[9824,9390,8402,6973,6719,5820,5377,6163]
How to caculate the value of the m p and q.
1 Comment
jose antonio valles
on 28 Nov 2021
m is the people o the market = 5000, p is the innovation = 0.003 and q is the imitation = 0.5
Answers (1)
John D'Errico
on 25 Jan 2019
Edited: John D'Errico
on 30 Nov 2021
Totally impossible.
y = m*(1-exp(-(p+q)*x))/(1+(q/q)*exp(-(p+q)*x))
First, I notice the q/q term in there. sorry, but unless q==0, that ratio is 1. And if q is zero, then q/q is undefined.
So your model now reduces to
y = m*(1-exp(-(p+q)*x))/(1+exp(-(p+q)*x))
What are p and q? pick any value for the sum, and there are infinitely many ways to choose p and q, all equally good, all equally valid. So at best, we can estimate the sum, p+q. But you can never infer the value of p versus q.
So now your model reduces to
y = m*(1-exp(-r*x))/(1+exp(-r*x))
Are we any closer to something you can use?
x=1:8;
y=[9824,9390,8402,6973,6719,5820,5377,6163];
plot(x,y,'o')

Seriously? You want to fit that model to what is not much more than a straight line, with one point at the end that blips up? Is this a practical joke?
The basic functional form for the function you propose fitting is what could be broadly called a sigmoidal shape. The m coefficient out front does nothing except scale the curve in y. And the value of r is no more than a stretch on the x-axis.
fun = @(x,r) (1-exp(-r*x))./(1+exp(-r*x))
fun =
function_handle with value:
@(x,r)(1-exp(-r*x))./(1+exp(-r*x))
ezplot(@(x) fun(x,1))

So that is one of many models that can be used to fit a curve that transitions smoothly between two constant levels, and is asymptotic to the two levels as x goes from -inf to +inf.
Now, you want to fit that data to this model? I'll just tell you that no, you will never get any meaningful fit to that data from this model.
I'm sorry. I have no idea where you got that data from, but it is essentially useless to fit anything more than a straight line. And I have no idea why you think the model you have chosen would be appropriate. It is simply impossible to estimate parameters for that model, nor do I have any idea why you would even think that model might be appropriate for this data.
3 Comments
Yuehao Sui
on 25 Jan 2019
John D'Errico
on 25 Jan 2019
Even at that, q/p does not change the fundamental shape of the model. (Unless p and q have opposite signs, in which case the fundamental shape of the curve is more like a hyperbola. ANd that would fit your data even more poorly.)
So as long as p and q have the same sign, you still have a curve with the same fundamental shape as what I plotted. And nothing you do to vary q, p, and m will make that curve fit your data.
jose antonio valles
on 28 Nov 2021
% This algorithm calculates the Bass Model
% input data
n = input('Enter Market sise: ');
p = input('Enter the innovation factor: ');
q = input('Enter yhe imitation factor: ');
v=0
for i=1:10
s=(p*n)+(q-p)*v-(q/n)*v^2
v=v+s
% output data
fprintf('the Bass model is: %.2f\n',s)
end
Categories
Find more on Linear Predictive Coding in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!