GBM {DIMORA}R Documentation

Generalized Bass model

Description

Function that estimates the Generalized Bass model with Exponential, Rectangular, or Mixed shock. Fitted values for cumulative and instantaneous data are displayed (if display = T). Out-of-sample prediction is performed based on estimated parameters.

Usage

GBM(series, shock = c("exp", "rett", "mixed"), nshock,
                    prelimestimates, alpha = 0.05,
                    oos = round(length(series)*0.25), display = T)

Arguments

series

the instantaneous observed data.

shock

the parameters which define the shocks. The available options are:

  • "exp" = Exponential;

  • "rett" = Rectangular;

  • "mixed" = Mixed (only when nshock = 2).

nshock

the number of shocks (from 1 to 3).

prelimestimates

a vector containing the preliminary estimates of the parameters (see Details and Examples).

alpha

the significance level for confidence intervals.

oos

positive integer value: number of predictions after the last observed one. Default setting to 25% of the length of the data.

display

if TRUE returns the fitted values for cumulative and instantaneous observed data. If 'oos' is specified, it also returns the predicted fit values.

Details

Each type of shock is characterized by specific parameters.

The analyst has to set both the preliminary estimates of the parameters m, p, q and the ones related to the shock(s) a, b, c. The parameters related to each shock have to be defined as follows:

Value

GBM returns an object of class "Dimora".

The function summary is used to obtain and print a summary table of the results. The generic accessor functions coefficients, fitted and residuals extract various useful features of the value returned by GBM.

An object of class "Dimora" is a list containing at least the following components:

model

the model formula used.

type

the model frame used.

Estimate

a summary table of estimates.

coefficients

a named vector of coefficients.

Rsquared

the statistical measure R-squared.

RSS

the residual sum of squares.

residuals

the residuals (observed cumulative data - fitted cumulative data).

fitted

the cumulative fitted values.

data

the cumulative observed series.

call

the matched call.

Author(s)

References

Guidolin, M. (2023). Innovation Diffusion Models: Theory and Practice, First Edition. John Wiley & Sons Ltd.

Bass, F.M., Krishnan, T.V., & Jain, D.C. (1994). Why the Bass model fits without decision variables. Marketing science, 13 (3), 203-223.

See Also

The Dimora models: BM, GGM, UCRCD.

summary.Dimora for summaries.

plot.Dimora for graphics and residuals analysis.

predict.Dimora for prediction.

make.instantaneous to create instantaneous series from the cumulative one.

Examples

data(DBdimora)
iphone<- DBdimora$iPhone[7:52]
imac<- DBdimora$iMac[1:52]

## Example 1: exponential shock
M3 <- GBM(iphone, shock = "exp", nshock = 1,
          prelimestimates = c(BM(iphone, display=FALSE)$Estimate[1,1],
                              BM(iphone, display=FALSE)$Estimate[2,1],
                              BM(iphone, display=FALSE)$Estimate[3,1],
                              17,-0.1,0.1))
summary(M3)
plot.Dimora(M3, oos=25)
# 25 predictions

## Example 2: rectangular shock
M4 <- GBM(imac,shock = "rett",nshock = 1,
           prelimestimates = c(BM(imac, display=FALSE)$Estimate[1,1],
                               BM(imac, display=FALSE)$Estimate[2,1],
                               BM(imac, display=FALSE)$Estimate[3,1],
                               20,30,0.1), oos=20)
summary(M4)

## Example 3: mixed shock
## The prelimestimates of m, p, q are their relative values estimated through M4.

M5 <- GBM(imac,shock = "mixed",nshock = 2,
           prelimestimates = c(M4$Estimate[1,1],
                               M4$Estimate[2,1],
                               M4$Estimate[3,1],
                               6,-0.1,0.1, 20,30,0.1), oos=0)
summary(M5)





[Package DIMORA version 0.3.6 Index]