Fits the Bass Diffusion model. In particular, fits an observed curve of
proportions of adopters to
fitbass(dat, ...)# S3 method for diffnet
fitbass(dat, ...)
# S3 method for default
fitbass(dat, ...)
# S3 method for 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)
An object of class nls
and diffnet_bass
. For more
details, see nls
in the stats package.
Either a diffnet object, or a numeric vector. Observed cumulative proportion of adopters.
Further arguments passed to the method.
An object of class diffnet_bass
.
Integer vector. Time (label).
Passed to matplot
.
Passed to matplot
.
Passed to matplot
.
Character scalar. Label of the y
axis.
Character scalar. Label of the x
axis.
Passed to matplot
.
Passed to matplot
.
Passed to matplot
.
Passed to matplot
.
Logical scalar. When TRUE
, draws a legend.
Integer vector with values greater than 0. The
Numeric scalar. Coefficient of innovation.
Numeric scalar. Coefficient of imitation.
George G. Vega Yon
The function fits the bass model with parameters
Which is implemented in the bass_F
function. The proportion of adopters
at time
and it's implemented in the bass_f
function.
For testing purposes only, the gradient of bass_dF
.
The estimation is done using nls
.
Bass's Basement Institute Institute. The Bass Model. (2010). Available at: https://web.archive.org/web/20220331222618/http://www.bassbasement.org/BassModel/. (accessed live for the last time on March 29th, 2017.)
Other statistics:
classify_adopters()
,
cumulative_adopt_count()
,
dgr()
,
ego_variance()
,
exposure()
,
hazard_rate()
,
infection()
,
moran()
,
struct_equiv()
,
threshold()
,
vertex_covariate_dist()
# 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)
Run the code above in your browser using DataLab