help for xtmixediouRachael Hughes

Title

xtmixediou -- Linear mixed effects Integrated Ornstein-Uhlenbeck model

Syntax

xtmixediou depvar [indepvars] [if] [in] ,
id(levelvar)
time(timevar)
[ other_options ]

where levelvar is a variable identifying the group structure for the random effects and timevar is a variable identifying the observation timepoints of depvar.

*id(levelvar) defines the group structure variable for the random effects

*time(timevar) variable for the measurement times of depvar

nofeconstant suppresses the constant term for the fixed portion of the model

reffects(varlist) defines the random effects of the model

noreconstant suppresses the constant term for the random portion of the model

iou(ioutype) specifies the parameterization of the IOU process used in estimation

brownian specifies a scaled Brownian Motion process, which is a special case of the IOU process

svdataderived starting values derived from the data

algorithm(algorithm_spec) maximization algorithm

iterate(#) performs maximum of # iterations; default is iterate(16000)

difficult uses a different stepping algorithm in nonconcave regions

nolog suppresses the display of the iteration log

trace displays the current parameter vector in iteration log

gradient displays the current gradient in iteration log

showstep reports steps within an iteration log

hessian displays the current Hessian matrix in iteration log

*id(levelvar) and *time(timelvar) are required options.

where algorithm_spec is

algorithm [ # [ algorithm [#] ] ... ]

and algorithm is {nr | fs | ai}.

ioutype

at IOU parameterization is and tau, the default

ao IOU parameterization is alpha and omega = (tau²/alpha²)

lnat IOU parameterization is ln(alpha) and tau

lnao IOU parameterization is ln(alpha) and omega = (tau²/alpha²)

isat IOU parameterization is 1/(alpha²) and tau

isao IOU parameterization is 1/(alpha²) and omega = (tau²/alpha²)

Description

xtmixediou fits a two-level linear mixed effects model with an added Integrated Ornstein-Uhlenbeck (IOU) nonstationary stochastic process, which can be applied to balanced and unbalanced longitudinal continuous data.
The model allows for different levels of derivative tracking; that is, the degree to which a
subject's longitudinal measurements maintain the same trajectory over long periods of time.
Note that, a linear mixed effects model without an IOU process assumes strong derivative tracking (i.e., a subject's measurements follows
the same trajectory over long periods). The IOU process also allows the variance of the within-subject errors to change over time and for serial correlation,
where the correlation between two measurements (within a subject) decreases with increasing time difference.

The IOU process is parameterized by two parameters alpha and tau (or functions of alpha and tau).
Parameter alpha is a measure of the degree of derivative tracking, where a small value indicates strong derivative tracking. Parameter tau serves as a scaling parameter.
As alpha tends to infinity and the ratio tau²/alpha²
is held constant the IOU process becomes the scaled Brownian Motion (BM) process, which is parameterized by a single parameter phi.

The overall error distribution of the linear mixed effects model is assumed to be Gaussian. The model is fitted using restricted maximum likelihood (REML) estimation.

Options

model

id(levelvar) defines the variable for identifying subjects (level-2 units). levelvar can be a numeric variable or a string variable. This is a required option.

time(timevar) defines the numeric variable for the observation timepoints of depvar. This is a required option.

nofeconstant suppresses the constant term for the fixed portion of the model. By default a constant term is included in the fixed portion of the model.

reffects(varlist) defines the random effects of the model. xtmixediou automatically includes a constant term in the random effects. For two or more random effects
an unstructured covariance matrix is assumed (i.e., all variances and covariances are distinctly estimated). Factor variables are not allowed. The default (when
reffects(varlist) is not specified) is a random intercept.

noreconstant suppresses the constant term for the random effects of the model. By default a constant term is included in the random portion of the model.

iou(ioutype) specifies the parameterization of the IOU process used during REML estimation.
Six different parameterizations of the IOU process are allowed (see ioutype).
The default parameterization is alpha and tau (ioutype=at). Changing the IOU parameterization may improve convergence.
For example, parameterizations ln(alpha) or 1/(alpha²) may be useful if alpha is suspected to be large.
There is no guarantee that any of the other parameterizations work better than the default; sometimes it is better and sometimes it is worse.

brownian specifies a scaled Brownian Motion (BM) process, a special case of the IOU process, which is parameterized by a single parameter phi. The BM process represents no
derivative tracking and the fitted model then becomes the linear mixed effects Brownian Motion model.

svdataderived specifies that the starting values of all of the model's variance parameters (i.e., random effects variances and
covariances, IOU or BM parameters and measurement error variance) are derived from the data. svdataderived assumes the user has specified
(using options reffects() and/or noreconstant) that the random effects only include a random intercept and/or a random linear slope.
When svdataderived is not specified (i.e., the default) then a linear mixed effects model without an added IOU or BM process is
fitted (using Stata’s command mixed) and the resulting expectation maximization estimates are used as the starting values for the random effects variances
and covariances, and the measurement error variance; whilst the starting values for the IOU or BM parameters are set to small positive values
(i.e., representing strong derivative tracking). xtmixediou saves the starting values to matrix e(sv).

algorithm(algorithm_spec) specifies the optimization algorithm used to perform REML estimation.
The following algorithms are allowed:

algorithm(nr) specifies the Newton-Raphson (NR) algorithm.

algorithm(fs) specifies the Fisher Scoring (FS) algorithm.

algorithm(ai) specifies the Average Information (AI) algorithm.

The default is algorithm(nr).

You can switch between algorithms by specifying more than one in the algorithm() option. By default, an algorithm is used for
five iterations before switching to the next algorithm. To specify a different number of iterations, include the number after the algorithm in
the option. For example, specifying algorithm(fs 10 nr 1000) requests using 10 iterations with the FS algorithm
followed by 1000 iterations with the NR algorithm, and then switch back to FS for 10 iterations, and so on. The process continues until
convergence or until the maximum number of iterations is reached.

Convergence of the NR algorithm may be improved by starting with a few, say 3, iterations of the FS or AI algorithm, especially when the starting values
of the parameters are suspected to be far from the REML estimates.

iterate(#) specifies the maximum number of iterations.
When the number of iterations equals iterate(), the optimizer stops and
presents the current results. If convergence is declared before this
threshold is reached, it will stop when convergence is declared. The default value is iterate(16000).

difficult specifies that the likelihood function is likely to be
difficult to maximize because of nonconcave regions. When the message "not
concave" appears repeatedly, ml's standard stepping algorithm may not be
working well. difficult specifies that a different stepping algorithm be
used in nonconcave regions. There is no guarantee that difficult will
work better than the default; sometimes it is better and sometimes it is
worse. You should use the difficult option only when the default stepper
declares convergence and the last iteration is "not concave" or when the
default stepper is repeatedly issuing "not concave" messages and producing only
tiny improvements in the log likelihood.

nolog suppresses the display of the iteration log showing the progress of the log likelihood. The log is displayed by default.

trace adds to the iteration log a display of the current parameter vector.

gradient adds to the iteration log a display of the current gradient vector.

showstep adds to the iteration log a report on the steps within an iteration.

hessian adds to the iteration log a display of the current negative Hessian matrix.

Examples

Random intercept IOU model

. xtmixediou ln_cd4 measurement age sex, id(patient_id) time(measurement)

Random intercept and random slope IOU model, with the IOU process parameterized as eta = ln(alpha) and tau

. xtmixediou ln_cd4 measurement age sex, id(patient_id) time(measurement) re(measurement) iou(et)

Random intercept and random slope IOU model, with all starting values derived from the data

. xtmixediou ln_cd4 measurement age sex, id(patient_id) time(measurement) re(measurement) svdata

Random intercept and random slope IOU model, with estimation performed using 10 FS iterations followed by 100 NR iterations

. xtmixediou ln_cd4 measurement age sex, id(patient_id) time(measurement) re(measurement) algorithm(fs 10 nr 100)

Stored results

xtmixediou stores the following in e():

Scalars
e(N) number of observations

e(k) number of parameters

e(k_f) number of fixed effects parameters

e(k_r) number of random effects parameters

e(k_res) number of residual-error parameters

e(ll_reml) restricted log-likelihood

e(converged) 1 if converged, 0 otherwise

Macros
e(cmd) xtmixediou

e(cmdline) command as typed

e(title) title in estimation output

e(depvar) name of dependent variable

e(id) name of variable identifying level-2 units

e(time) name of timepoint variable for depvar, i.e. timevar

e(revars) names of random effects variables

e(redim) random effects dimension

e(iou) iou() specification

e(method) REML

e(ml_method) type of ml method

e(opt) type of optimization

e(predict) command used to implement predict

e(properties) b V

Matrices
e(b) coefficient vector

e(V) variance-covariance matrix of the estimators

e(sv) starting values of the variance parameters

e(N_g) group counts

e(g_min) group-size minimum

e(g_avg) group-size average

e(g_max) group-size maximum

Functions
e(sample) marks estimation sample

References

Taylor, J. M. G., Cumberland, W. G and Sy, J. P. 1994. A Stochastic Model for Analysis of Longitudinal AIDS Data. Journal of the American Statistical Association 89: 727-736.

Taylor, J. M. G. and Law, N. 1998. Does the covariance structure matter in longitudinal modelling for the prediction of future CD4 counts? Statistics in Medicine 17: 2381-2394.