bass: Bass Model

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Fits the Bass Diffusion model. In particular, fits an observed curve of proportions of adopters to F(t), the proportion of adopters at time t, finding the corresponding coeficients p, Innovation rate, and q, imitation rate.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
fitbass(dat, ...)

## S3 method for class 'diffnet'
fitbass(dat, ...)

## Default S3 method:
fitbass(dat, ...)

## S3 method for class 'diffnet_bass'
plot(
  x,
  y = 1:length(x$m$lhs()),
  add = FALSE,
  pch = c(21, 24),
  main = "Bass Diffusion Model",
  ylab = "Proportion of adopters",
  xlab = "Time",
  type = c("b", "b"),
  lty = c(2, 1),
  col = c("black", "black"),
  bg = c("lightblue", "gray"),
  include.legend = TRUE,
  ...
)

bass_F(Time, p, q)

bass_dF(p, q, Time)

bass_f(Time, p, q)

Arguments

dat

Either a diffnet object, or a numeric vector. Observed cumulative proportion of adopters.

...

Further arguments passed to the method.

x

An object of class diffnet_bass.

y

Integer vector. Time (label).

add

Passed to matplot.

pch

Passed to matplot.

main

Passed to matplot.

ylab

Character scalar. Label of the y axis.

xlab

Character scalar. Label of the x axis.

type

Passed to matplot.

lty

Passed to matplot.

col

Passed to matplot.

bg

Passed to matplot.

include.legend

Logical scalar. When TRUE, draws a legend.

Time

Integer vector with values greater than 0. The t parameter.

p

Numeric scalar. Coefficient of innovation.

q

Numeric scalar. Coefficient of imitation.

Details

The function fits the bass model with parameters [p, q] for values t = 1, 2, …, T, in particular, it fits the following function:

F(t) = [1 - exp(-(p + q)*t)]/[1 + exp(-(p + q)*t)*(q/p)]

Which is implemented in the bass_F function. The proportion of adopters at time t, f(t) is:

f(t) = ifelse(t == 1, F(t), F(t) - F(t-1))

and it's implemented in the bass_f function.

For testing purposes only, the gradient of F with respect to p and q is implemented in bass_dF.

The estimation is done using nls.

Value

An object of class nls and diffnet_bass. For more details, see nls in the stats package.

Author(s)

George G. Vega Yon

References

Bass's Basement Institute Institute. The Bass Model. (2010). Available at: http://www.bassbasement.org/BassModel/Default.aspx. (Accessed: 29th March 2017)

See Also

Other statistics: classify_adopters(), cumulative_adopt_count(), dgr(), ego_variance(), exposure(), hazard_rate(), infection(), moran(), struct_equiv(), threshold(), vertex_covariate_dist()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Fitting the model for the Brazilian Farmers Data --------------------------
data(brfarmersDiffNet)
ans <- fitbass(brfarmersDiffNet)

# All the methods that work for the -nls- object work here
ans
summary(ans)
coef(ans)
vcov(ans)

# And the plot method returns both, fitted and observed curve
plot(ans)

USCCANA/netdiffuseR documentation built on March 14, 2020, 11:38 a.m.