Extension end data tecdat: R language Bass model for sales forecast

Time:2021-8-3

Original link:http://tecdat.cn/?p=3937

Original source:Tuo end data tribal official account

Bass diffusion model

Bass diffusion modelThree parameters: total number of people who finally purchased products m; Innovation coefficient P; And imitation coefficient Q,

nls(Sales~M*(((P+Q)^2/P)\*exp(-(P+Q)\*T79))/(1+(Q/P)\*exp(-(P+Q)\*T79))^2,



## Parameters:

## Estimate Std. Error t value Pr(>|t|)

## M 6.80e+04 3.13e+03 21.74 1.1e-07 ***

## P 6.59e-03 1.43e-03 4.61 0.0025 **

## Q 6.38e-01 4.14e-02 15.41 1.2e-06 ***

## ---

## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

##

## Residual standard error: 727 on 7 degrees of freedom

##

## Number of iterations to convergence: 8

## Achieved convergence tolerance: 7.32e-06

#   Gain coefficient

Bcoef <- coef(Bass.nls)

m <- Bcoef\[1\]

p <- Bcoef\[2\]

q <- Bcoef\[3\]

Set the starting value of m to the total sales recorded.

ngete <- exp(-(p + q) * Tdelt)
#   Plot probability density function
Bpdf <- m * ((p + q)^2/p) * ngete/(1 + (q/p) * ngete)^2
plot(Tdelt, Bpdf

Extension end data tecdat: R language Bass model for sales forecast

plot(Tdelt, Bcdf, xlab = "Year from 1979"

Extension end data tecdat: R language Bass model for sales forecast

#When Q  =  0, only innovators have no imitators.

Ipdf <- m * ((p + 0)^2/p) * exp(-(p + 0) * Tdelt)/(1 + (0/p) * exp(-(p + 0) *


col = "red")lines(Tdelt, Impdf, col = "green")lines(Tdelt, Ipdf, col = "blue")

Extension end data tecdat: R language Bass model for sales forecast

When Q  =  0 hour

Icdf <- m * (1 - exp(-(p + 0) * Tdelt))/(1 + (0/p) * exp(-(p + 0) * Tdelt))





lines(Tdelt, Icdf, col = "blue")

Extension end data tecdat: R language Bass model for sales forecast