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:
|
nshock |
the number of shocks (from 1 to 3). |
prelimestimates |
a vector containing the preliminary estimates of the parameters (see |
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 |
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:
Exponential:
a =
starting time of the shockb =
memory of the effect (typically negative, suggesting an exponentially decaying behavior)c =
intensity of the shock (may be either positive or negative)
In case of more than one shock, preliminary estimates need to be specified as follows:
prelimestimates = c(m, p, q, a1, b1, c1, a2, b2, c2, a3, b3, c3)
Rectangular:
a =
starting time of the shockb =
ending time of the shockc =
intensity of the shock (may be either positive or negative)
In case of more than one shock, preliminary estimates need to be specified as follows:
prelimestimates = c(m, p, q, a1, b1, c1, a2, b2, c2, a3, b3, c3)
Mixed: when the series has one exponential and one rectangular shock (you always have to specify the exponential shock before the rectangular one, even if the exponential one occurs later)
a1 =
starting time of the exponential shockb1 =
memory of the effect (typically negative, suggesting an exponentially decaying behavior)c1 =
intensity of the exponential shock (may be either positive or negative)
a2 =
starting time of the rectangular shockb2 =
ending time of the rectangular shockc2 =
intensity of the rectangular shock (may be either positive or negative)
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)
Zanghi Federico: federico.zanghi.11@gmail.com
Savio Andrea: svandr97@gmail.com
Ziliotto Filippo: filippo.ziliotto1996@gmail.com
Bessi Alessandro: alessandrobessi92@gmail.com
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)