Coder Social home page Coder Social logo

diffusion's People

Contributors

config-i1 avatar mamut86 avatar trnnick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

diffusion's Issues

Include genetic algorithm

Maybe we should have a look at: Venkatesan, R., T. V. Krishnan, V. Kumar. 2004. Evolutionary estimation of macro-level diffusion models using genetic algorithms: An alternative to nonlinear least squares.

Plots of diffusion models

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?

Further diffusion models to include

A potential list:

  • NIU - Easingwood et al. 1983. A Nonuniform Influence Innovation Diffusion Model.
  • Logistic model
  • Weibull model - done
  • Gamma model
  • GMB - Bass, F.M et al. 1994. Why the Bass Model Fits without Decision Variables.
  • Trapezoids and Triangles - Hu et al. 2018. Forecasting New Product Life Cycle Curves: Practical Approach and Empirical Analysis

Clean variable names

change variables names which some of them are violating good R coding practice, i.e. t and c used

Add time series objects compability

TS object compatibility would ensure that the plots and outputs also handle date information. There is also a bug that actuals are not shown in the plot when entered as TS object

dataSafari <- ts(tsSafari[,-1],frequency=12,start=c(2009,1));
safari6 <- dataSafari[,8];
safari6 <- window(safari6,start=time(safari6)[which(safari6!=0)[1]]);
plot(diffusion(safari6))
plot(diffusion(dataSafari[,8]))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.