Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plots of diffusion models #15

Open
config-i1 opened this issue Jan 26, 2019 · 1 comment
Open

Plots of diffusion models #15

config-i1 opened this issue Jan 26, 2019 · 1 comment
Assignees

Comments

@config-i1
Copy link
Collaborator

There is a neat plot in case of type="bass" with innovators and imitators, but it seems that this can also be done for other curves. Here's an example with Shifted Gompertz (not compound with Gamma):

a <- 1000
b <- 0.4
c <- 1
p <- exp(-c)
q <- (b-p)/b
t <- c(0:100)/10

plot(t,a*b*exp(-b*t-c*exp(-b*t))*(1+c*(1-exp(-b*t))),type="l",ylab="y(t)",lwd=2)
# Innovators
lines(t,p*a*b*exp(-b*t-c*exp(-b*t))*(1+c*(1-exp(-b*t))),col="darkgreen",lwd=2)
# Imitators
lines(t,q*a*b*exp(-b*t-c*exp(-b*t))*(1+c*(1-exp(-b*t))),col="darkblue",lwd=2)

image

Is it possible to do similar plots for other functions?

@mamut86
Copy link
Owner

mamut86 commented Jan 27, 2019

Thanks a lot for this suggestion! I am not sure it is a good idea to have innovator and imitator coefficients in all diffusion curve types available as they derive at different interpretation than in the Bass diffusion context. For example, your graph presented, the innovator shape looks counterintuitive to the underlying theory where the imitators are dependent on the innovators. However, it might be an interesting addon to the G/SG model which if c = 1, it represents a Bass model and its parameter p and q can readily be derived (see example). In a recent publication, Bemmoar & Zheng (2018, IJF) also uses a G/SG model parametrised with p and q parameters. However, it first needs the implementation of Issue #11, so that one can fix certain parameters.

a <- 15
b <- 0.2
c <- 1 # if c = 1 (Bass model)
p <- b / (1 + a)
q <- (a*b) / (1 + a)

plot(difcurve(50, w = c(a,b,c,1), type = "gsgompertz")[,2], ylab = "y(t)", type = "l", lwd = 2)
# Innovators
lines(difcurve(50, w = c(p,q,1), type = "bass")[,3], col = "darkgreen", lwd = 2)
# Imitators
lines(difcurve(50, w = c(p,q,1), type = "bass")[,4], col = "darkblue", lwd = 2)

gsg

@mamut86 mamut86 self-assigned this Jan 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants