logitord
fits an longitudinal proportional odds model in discrete
time to the ordinal outcomes and a logistic model to the probability of
dropping out using a common random effect for the two.
logitord(
y,
id,
out.ccov = NULL,
drop.ccov = NULL,
tvcov = NULL,
out.tvcov = !is.null(tvcov),
drop.tvcov = !is.null(tvcov),
pout,
pdrop,
prand.out,
prand.drop,
random.out.int = TRUE,
random.out.slope = !is.null(tvcov),
random.drop.int = TRUE,
random.drop.slope = !is.null(tvcov),
binom.mix = 5,
fcalls = 900,
eps = 1e-04,
print.level = 0
)
A list of class logitord
is returned.
A vector of binary or ordinal responses with levels 1 to k and 0 indicating drop-out.
Identification number for each individual.
A vector, matrix, or model formula of time-constant
covariates for the outcome regression, with variables having the same
length as y
.
A vector, matrix, or model formula of time-constant
covariates for the drop-out regression, with variables having the same
length as y
.
One time-varying covariate vector.
Include the time-varying covariate in the outcome regression.
Include the time-varying covariate in the drop-out regression.
Initial estimates of the outcome regression coefficients, with length equal to the number of levels of the response plus the number of covariates minus one.
Initial estimates of the drop-out regression coefficients, with length equal to one plus the number of covariates.
Optional initial estimates of the outcome random parameters.
Optional initial estimates of the drop-out random parameters.
If TRUE, the outcome intercept is random.
If TRUE, the slope of the time-varying covariate is random for the outcome regression (only possible if a time-varying covariate is supplied and if out.tvcov and random.out.int are TRUE).
If TRUE, the drop-out intercept is random.
If TRUE, the slope of the time-varying covariate is random for the drop-out regression (only possible if a time-varying covariate is supplied and if drop.tvcov and random.drop.int are TRUE).
The total in the binomial distribution used to approximate the normal mixing distribution.
Number of function calls allowed.
Convergence criterion.
If 1, the iterations are printed out.
T.R. Ten Have and J.K. Lindsey
Ten Have, T.R., Kunselman, A.R., Pulkstenis, E.P. and Landis, J.R. (1998) Biometrics 54, 367-383, for the binary case.
y <- trunc(runif(20,max=4))
id <- gl(4,5)
age <- rpois(20,20)
times <- rep(1:5,4)
logitord(y, id=id, out.ccov=~age, drop.ccov=age, pout=c(1,0,0),
pdrop=c(1,0))
logitord(y, id, tvcov=times, pout=c(1,0,0), pdrop=c(1,0))
Run the code above in your browser using DataLab