mm: Fit Marginalized Transition and/or Latent Variable Models

Description Usage Arguments Value Author(s) See Also Examples

Description

Fit a marginalzed transition and/or latent variable models (mTLV) as described by Schildcrout and Heagerty 2007.

Usage

1
2
3
4
mm(mean.formula, lv.formula = NULL, t.formula = NULL, id, data,
   inits = NULL, samp.probs = c(1, 1, 1), samp.probi=NULL, offset = 0, q = 10, 
   cond.like = FALSE, step.max = 1, step.tol = 1e-06, hess.eps = 1e-07, 
   adapt.quad = FALSE, verbose = FALSE,iter.lim=100)

Arguments

mean.formula

Mean model formula in which a binary variable is regressed on covariates.

lv.formula

Latent variable model formula (right hand side only)

t.formula

Transition model formula (right hand side only)

id

a vector of cluster identifiers (it should be the same length nrow(data)).

data

a required data frame

inits

an optional list of length 3 containing initial values for marginal mean parameters and all dependence parameters. The format of the list should be: (1) estimates of the mean parameters, (2) estimates of the transition parameters (or NULL if only fitting a mLV model) and (3) estimates of the latent variable parameters (or NULL if only fitting a mT model). If NULL, initial values will be automatically generated.

samp.probs

a vector of 3 values that denote the sampling probability of non-responders, any-responders, and all-responders.

samp.probi

a vector of sampling probabilities - if using weighted estimating equations.

offset

an optional offset term.

q

a scalar to denote the number of quadrature points used for GH numerical integration. Only values of 3, 5, 10, 20 and 50 are applicable.

cond.like

indicator to denote if the conditional likelihood should be maximized.

step.max

a scalar.

step.tol

a scalar.

hess.eps

a scalar.

adapt.quad

an indicator if adaptive quadrature is to be used. NOT CURRENTLY IMPLEMENTED.

verbose

an indicator if model output should be printed to the screen during maximization (or minimization of negative log-likelihood).

iter.lim

a scalar to denote the maximum iteration limit. Default value is 100.

Value

This function returns marginal mean (beta) and dependence parameters (alpha) along with the associated model and empirical covariance matricies.

Author(s)

Nathaniel Mercaldo

See Also

MMLongit

Examples

1
2
3
4
## Not run: 
data(datrand)
fit <- mm(Y~time*binary, t.formula=~1, data=datrand, id=id, step.max=4, verbose=FALSE)
## End(Not run)

mercaldo/MMLB documentation built on May 22, 2019, 6:51 p.m.