a matrix or data frame containing count data which is to be fitted. Columns correspond to time points, rows to observations.
lower
vector of lower bounds for estimated parameters mu, size and rho, respectively.
upper
vector of upper bounds for estimated parameters mu, size and rho, respectively.
method
algorithm used for minimization of the likelihood, see optim for details.
start
vector of starting values for estimated parameters mu, size and rho, respectively, used for optimization.
Value
fit.nb.inar1 return estimates of the mean mu, dispersion parameter size and correlation coefficient rho.
Details
the function fit.nb.inar1 fits a reparametrization of the NB-INAR(1) model as found in McKenzie (1986). The reparametrized model
assumes equal means and dispersion parameter between time points with an autoregressive correlation structure. The function is especially useful
for estimating parameters for an initial sample size calculation using n.nb.inar1. The fitting function allows for incomplete follow up,
but not for intermittent missingness.
References
McKenzie Ed (1986), Autoregressive Moving-Average Processes with Negative-Binomial and Geometric Marginal Distributions. Advances in Applied Probability Vol. 18, No. 3, pp. 679-705.
See Also
rnbinom.inar1 for information on the NB-INAR(1) model, n.nb.inar1 for calculating
initial sample size required when performing inference, bssr.nb.inar1 for blinded
sample size reestimation within a running trial, optim for more information on the used minimization algorithms.
# NOT RUN {#Generate data from the NB-INAR(1) modelset.seed(8)
random<-rnbinom.inar1(n=1000, size=1.5, mu=2, rho=0.6, tp=7)
estimate<-fit.nb.inar1(random)
estimate
# }