Finds the maximum likelihood estimate of a log-link binomial GLM using an EM algorithm, where each of the coefficients in the linear predictor is restricted to be non-positive.
nplbin(y, x, offset, start, control = logbin.control(),
accelerate = c("em", "squarem", "pem", "qn"),
control.accelerate = list(list()))
binomial response. May be a single column of 0/1 or two columns, giving the number of successes and failures.
non-negative covariate matrix.
non-positive additive offset vector. The default is a vector of zeros.
starting values for the parameter estimates. All elements must be less than
or equal to -control$bound.tol
.
a logbin.control
object, which controls the fitting process.
a character string that determines the acceleration
algorithm to be used, (partially) matching one of "em"
(no acceleration -- the default),
"squarem"
, "pem"
or "qn"
. See turboem
for further details. Note that "decme"
is not permitted.
a list of control parameters for the acceleration algorithm. See turboem
for details of the parameters that apply to each algorithm. If not specified, the defaults are used.
A list containing the following components
the constrained non-positive maximum likelihood estimate of the parameters.
the residuals at the MLE, that is y - fitted.values
the fitted mean values.
the number of parameters in the model (named "rank
" for compatibility ---
we assume that models have full rank)
included for compatibility --- will always be binomial(log)
.
the linear fit on link scale.
up to a constant, minus twice the maximised log-likelihood.
a version of Akaike's An Information Criterion, minus twice the maximised log-likelihood plus twice the number of parameters.
a small-sample corrected version of Akaike's An Information Criterion (Hurvich, Simonoff and Tsai, 1998).
the deviance for the null model, comparable with deviance
.
The null model will include the offset and an intercept.
the number of iterations of the EM algorithm used.
included for compatibility --- a vector of ones.
the number of trials associated with each binomial response.
the residual degrees of freedom.
the residual degrees of freedom for the null model.
the y
vector used.
logical. Did the EM algorithm converge
(according to conv.test
)?
logical. Is the MLE on the boundary of the parameter
space --- i.e. are any of the coefficients < control$bound.tol
?
the maximised log-likelihood.
the non-negative x
matrix used.
This is a workhorse function for logbin
, and runs the EM algorithm to find the
constrained non-positive MLE associated with a log-link binomial GLM. See Marschner
and Gillett (2012) for full details.
Hurvich, C. M., J. S. Simonoff and C.-L. Tsai (1998). Smoothing parameter selection in non-parametric regression using an improved Akaike information criterion. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 60(2): 271--293.
Marschner, I. C. and A. C. Gillett (2012). Relative risk regression: reliable and flexible methods for log-binomial models. Biostatistics 13(1): 179--192.