R/fit_glm_cmp_vary_nu.R
fit_glm_cmp_vary_nu.Rd
This is a workhorse function in which glm.cmp to call upon to fit a mean-parametrized Conway-Maxwell Poisson generalized linear model with varying dispersion.
fit_glm_cmp_vary_nu(
y = y,
X = X,
S = S,
offset = offset,
betastart = betastart,
gammastart = gammastart,
lambdalb = lambdalb,
lambdaub = lambdaub,
maxlambdaiter = maxlambdaiter,
tol = tol
)
the response y vector.
the design matrix for regressing the mean
the design matrix for regressing the dispersion
this can be used to specify an a priori known component to be included
in the linear predictor for mean during fitting. This should be NULL
or a numeric vector
starting values for the parameters in the linear predictor for mu.
starting values for the parameters in the linear predictor for nu.
numeric: the lower and upper end points for the interval to be
searched for lambda(s). The default value for lambdaub should be sufficient for small to
moderate size nu. If nu is large and required a larger lambdaub
, the algorithm
will scale up lambdaub
accordingly.
numeric: the maximum number of iterations allowed to solve for lambda(s).
numeric: the convergence threshold. A lambda is said to satisfy the mean constraint if the absolute difference between the calculated mean and a fitted values is less than tol.
A fitted model object of class cmp
similar to one obtained from glm
or glm.nb
.
## For examples see example(glm.cmp)