# NOT RUN {
data(cdnowSummary)
cal.cbs <- cdnowSummary$cbs
# cal.cbs already has column names required by method
# starting-point parameters
startingparams <- c(0.5, 6, 0.9, 8)
# estimated parameters
est.params <- pnbd.EstimateParameters(cal.cbs = cal.cbs,
par.start = startingparams,
method = 'L-BFGS-B',
hardie = TRUE)
# complete object returned by \code{\link[optimx]{optimx}}
optimx.set <- pnbd.EstimateParameters(cal.cbs = cal.cbs,
par.start = startingparams,
hardie = TRUE,
hessian = TRUE)
# log-likelihood of estimated parameters
pnbd.cbs.LL(est.params, cal.cbs, TRUE)
# }
Run the code above in your browser using DataLab