Nortonbass: Norton-Bass model

View source: R/nortonbass.R

NortonbassR Documentation

Norton-Bass model

Description

Nortonbass fits a generational Bass model proposed by Norton and Bass (1987). Each subsequent generation influences the sales of the previous generation. The set of equation is estimated simulataneously.

Usage

Nortonbass(
  x,
  startval.met = c("2ST", "BB", "iBM"),
  estim.met = c("BOBYQA", "OLS", "SUR", "2SLS", "3SLS"),
  gstart = NULL,
  startval = NULL,
  flexpq = F
)

Arguments

x

matrix or dataframe containing demand for each generation in non-cumulative form.

startval.met

Different methods of obtaining starting values.

"2ST"

Two stage approach taking "BB" method first and then re-estimate if flexpq == T (default)

"BB"

Bass and Bass (2004) method which sets p_{1,\dots,j} = 0.003, q_{1,\dots,j} = 0.05 and m_j is the maximum observed value for generation j

"iBM"

Fits individual Bass models and uses this as estimators. In case flexpq == F the median of p and q is used

estim.met

Estimation method, "BOBYQA" see nlsystemfit (BOBYQA default)

gstart

optional vector with starting points of generations#'

startval

an optional Vector with starting for manual estimation

flexpq

If TRUE, generations will have independent p and q values as suggested by Islam and Maed (1997). Note that model might not converge.

Details

For starting values the Vector values need to be named in the case flexpq == T p_1,\dots,p_j,q_1,\dots,q_j,m_1,\dots,m_j. In the case of flexpq == F p_1, q_1, m_1,\dots, m_j.

If gstart is not provided, the generation starting points will be detected automatically selecting the first value that is non-zero.

Value

coef: coefficients for p, q and m

Author(s)

Oliver Schaer, info@oliverschaer.ch

References

Norton, J.A. and Bass, F.M., 1987. A Diffusion Theory Model of Adoption and Substitution for Successive Generations of High-Technology Products.

Islam, T. and Meade, N., 1997. The Diffusion of Successive Generations of a Technology: A More General Model. Technological Forecasting and Social Change, 56, 49-60.

Examples

 ## Not run: 
   fitNB1 <- Nortonbass(tsIbm, startval.met = "2ST", estim.met = "OLS",
                        startval = NULL, flexpq = F, gstart = NULL)
   fitNB2 <- Nortonbass(tsIbm, startval.met = "2ST", estim.met = "SUR",
                        startval = NULL, flexpq = F, gstart = NULL)
   # using BOBYQA algorithm
   fitNB3 <- Nortonbass(tsIbm, startval.met = "2ST", estim.met = "BOBYQA",
                        startval = NULL, flexpq = F, gstart = NULL)
   # Create some plots
   plot(tsibm[, 1],type = "l", ylim=c(0,35000))
   lines(tsibm[, 2],col ="blue")
   lines(tsibm[, 3],col ="green")
   lines(tsibm[, 4],col ="pink")
   lines(fitNB1$fit$fitted[[1]], col = "black", lty = 2)
   lines(fitNB1$fit$fitted[[2]], col = "blue", lty = 2)
   lines(fitNB1$fit$fitted[[3]], col = "green", lty = 2)
   lines(fitNB1$fit$fitted[[4]], col = "pink", lty = 2)
   lines(fitNB2$fit$fitted[[1]], col = "black", lty = 3)
   lines(fitNB2$fit$fitted[[2]], col = "blue", lty = 3)
   lines(fitNB2$fit$fitted[[3]], col = "green", lty = 3)
   lines(fitNB2$fit$fitted[[4]], col = "pink", lty = 3)
   lines(fitNB3$fit$fitted[[1]], col = "black", lty = 4)
   lines(fitNB3$fit$fitted[[2]], col = "blue", lty = 4)
   lines(fitNB3$fit$fitted[[3]], col = "green", lty = 4)
   lines(fitNB3$fit$fitted[[4]], col = "pink", lty = 4)
   # read out RMSE
   fitNB1$fit$RMSE[[1]]
   fitNB1$fit$RMSE[[2]]
   fitNB1$fit$RMSE[[3]]
   fitNB1$fit$RMSE[[4]]
   fitNB2$fit$RMSE[[1]]
   fitNB2$fit$RMSE[[2]]
   fitNB2$fit$RMSE[[3]]
   fitNB2$fit$RMSE[[4]]
   fitNB3$fit$RMSE[[1]]
   fitNB3$fit$RMSE[[2]]
   fitNB3$fit$RMSE[[3]]
   fitNB3$fit$RMSE[[4]]
 
## End(Not run)
 
  

mamut86/diffusion documentation built on April 19, 2024, 12:12 p.m.