logit.normal.mle {lnMLE} | R Documentation |
logit.normal.mle
allows for a more general model than the simple logistic-normal model since the scale parameter, sigma
, may depend on cluster level characteristics.
logit.normal.mle(meanmodel, logSigma, id, n=NULL, beta=NULL, alpha=NULL, model="marginal", lambda=0.0, r = 20, maxits=50, tol = 1e-3, data = sys.frame(sys.parent()) )
meanmodel |
a symbolic description of the marginal model to be fit that generally takes the form y ~ x . Further details of model specification are provided below.
|
logSigma |
a symbolic description of the model used to estimate the dependence of sigma on covariates z , where z is a subset of covariates x . In general, random has the form ~ z .
|
id |
Cluster identification variable. |
n |
Number of responses per binomial trial. |
beta |
Initial estimate of mean parameter. |
alpha |
Initial estimate of log variance component parameter. |
model |
"conditional" for classic GLMM, "marginal" for the marginalized model. |
lambda |
A likelihood penalty parameter (>= 0) for alpha |
r |
Number of Gauss-Hermite quadrature points. The user may choose r=3, 5, 10, 20, or 50. The default value is r=20. |
maxits |
Maximum number of iterations for convergence. The default is maxits=50. |
tol |
Convergence criterion that specifies the absolute change in parameter estimates. |
data |
an optional data frame containing the variables in the model. If not found in data , the variables are taken from environment(marginal) , typically the environment from which logit.normal.mle is called. |
logit.model.mle
assumes that longitudinal binary measurements of y
and possibly time-dependent exogenous covariates x
are collected at times t(i,1), t(i,2),..., t(i,n(i)) for i = 1,2,...,N subjects or clusters. Each of the clusters or individuals (id
) need not have measurements at every interval.
The meanmodel
is specified symbolically as a formula. A typical marginal model has the form y ~ x
. The covariates x
are a series of terms separated by +
which specify the marginal linear predictor for the longitudinal (binary) response vector y
. The parameter(s) beta
denote the contrast in log odds of success for subgroups defined by covariates x(t)
The user may provide initial estimate(s) for beta
.
The parameter alpha
describes how the individual-level heterogeneity sigma_i
in the log odds varies as a function of covariates z_i
. The random model statement (logSigma
) has the form ~ z
. The covariates z
are a subset of x
, possibly just an intercept. The user may provide initial estimates(s) for alpha
.
All formulas have an implied intercept term. To remove this, include -1
on the right-hand side of the formula statement. See formula
for more details.
Returns an object of class logit.normal.mle
. The function print.logit.normal.mle
may used to obtain and print a summary of the results. See below for an example.
Patrick Heagerty heagerty@u.washington.edu
Diggle, P.J. Heagerty, P. Liang, K.Y. and Zeger, S.L. (2002) "Analysis of Longitudinal Data", 2nd Edition, Oxford University Press.
Heagerty, P.J. (1999) "Marginally Specified Logistic-Normal Models for Longitudinal Binary Data", Biometrics 55, 688-98.
# ## Madras data example: # data(madras) attach(madras) model1 <- logit.normal.mle(meanmodel = y ~ gender+month+age+monthXage, logSigma = ~ 1 + age, id=id, model="marginal", data=madras) print.logit.normal.mle(model1)