Description Usage Arguments Details Value Author(s) References See Also Examples
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.
1 2 | 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 |
logSigma |
a symbolic description of the model used to estimate the dependence of |
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 |
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 |
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #
## 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)
#
## Eye and Race Example
#
data(eye_race)
attach(eye_race)
marg_model <- logit.normal.mle(meanmodel = value ~ black,
logSigma= ~1,
id=eye_race$id,
model="marginal",
data=eye_race,
tol=1e-5,
maxits=100,
r=50)
marg_model
cond_model <- logit.normal.mle(meanmodel = value ~ black,
logSigma= ~1,
id=eye_race$id,
model="conditional",
data=eye_race,
tol=1e-5,
maxits=100,
r=50)
cond_model
compare<-round(cbind(marg_model$beta, cond_model$beta),2)
colnames(compare)<-c("Marginal", "Conditional")
compare
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.