Description Usage Arguments Details Value WARNING Author(s) References See Also Examples
drm
fits a combined regression and association model for longitudinal
or otherwise clustered categorical responses using dependence ratio as
a measure of the association.
1 2 3 4 |
formula |
a formula expression as for other regression models.
In addition the cluster term has to be specified in the
expression by |
family |
a description of the link function to be used in the
model for a binary response. Default is logit link.
See |
data |
an optional data frame containing the variables in the model. |
weights |
an optional vector of weights to be used in the fitting process. Only equal weights within cluster are allowed. |
offset |
this can be used to specify an a priori known component to be included in the linear predictor during fitting. |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
na.action |
a function which indicates what should happen when
the data contain NAs. The default is |
start |
an optional vector of starting values for the
parameters. By default, the starting values
are estimated from |
link |
this can be used to specify alternative link functions
for nominal and ordinal responses. By default "cum", after which
the link is specified through |
dep |
|
Ncond |
logical argument defining whether the regression model is marginal or
conditional when the association is "N". The default is |
Lclass |
Number of latent classes in the population when the association is
"L". Default is 2. Available only for binary response. Note that in the
current implementation, the conditional probabilities are not
calculated for |
dropout |
logical argument. For monotone missing patterns in longitudinal studies,
this argument allows to impose a selection model (see [8] for
details) on top of regression and association model to investigate the sensitivity of
the results due to missingness. The model formula notation is:
|
drop.x |
an optional covariate vector for the selection model.
The covariate's previous value (notation: |
save.profiles |
logical argument defining whether the fitted
values of all possible profiles is saved. If |
pmatrix |
a character object specifying the name of the matrix
for all possible profiles, created using
|
print.level |
level of printing during numerical optimisation.
The default is 2. See |
iterlim |
maximum iteration limit for the numerical maxisimisation.
See |
... |
other arguments passed to |
drm
gives maximum likelihood estimates for the combined
regression and association model by decomposing a
joint probability of responses in a cluster to univariate
marginal or cumulative probabilities and dependence ratios of all
orders. See [1] and [5] for further details. The dimensionality
of the association part is reduced by imposing a model for
the association structure with dep
-argument. See
getass.drm
and [3-7] for details. Furthermore, a
selection model can be added on top of regression and association
model. See examples below and [5] and [8] for details.
drm
returns an object of class drm
.
The function summary
(i.e., summary.drm
) can be
used to obtain or print a summary of the results. The generic
accessor function coefficients
can be used to extract
coefficients.
An object of class drm
is a list containing at least the
following components:
coefficients |
a named vector of regression, and possibly association and selection model coefficients. |
cov.scaled |
a variance-covariance matrix of the parameter estimates. |
fitted.marginals |
the fitted values for the univariate means, obtained by transforming the linear predictors by the inverse of the link function. |
fitted.conditionals |
in case of "L"-structure, the fitted
values for the conditional univariate means, otherwise NULL. Not
yet implemented for |
fitted.profiles |
the fitted response profile probabilities
within each cluster, calculated by using the maximum likelihood
estimates from the model. See also |
deviance |
minus twice the maximised log-likelihood. |
aic |
An Information Criterion: minus twice the maximised log-likelihood plus twice the number of coefficients. Not available if the likelihood is weighted with the dropout probabilities. |
niter |
the number of iterations that |
code |
convergence code from |
call |
the matched call. |
terms |
the ‘terms’ object used. |
The maximum likelihood estimates may sometimes lead to negative fitted probabilities. In this case, both generic print-methods warn about this. In this case, the model is considered to be wrongly specified and model specification should be changed.
Jukka Jokinen, jukka.jokinen@helsinki.fi
1. Ekholm A, Smith PWF, McDonald JW. Marginal regression analysis of a multivariate binary response. Biometrika 1995; 82(4):847-854.
2. Ekholm A, Skinner C. The Muscatine children's obesity data reanalysed using pattern mixture models. Applied Statistics 1998; 47:251-263.
3. Ekholm A, McDonald JW, Smith PWF. Association models for a multivariate binary response. Biometrics 2000; 56:712-718.
4. Ekholm A, Jokinen J, Kilpi T. Combining regression and association modelling on longitudinal data on bacterial carriage. Statistics in Medicine 2002; 21:773-791.
5. Ekholm A, Jokinen J, McDonald JW, Smith PWF. Joint regression and association modelling of longitudinal ordinal data. Biometrics 2003; 59:795-803.
6. Jokinen J, McDonald JW, Smith PWF. Meaningful regression and association models for clustered ordinal data. Sociological Methodology 2006; 36:173-199.
7. Jokinen J. Fast estimation algorithm for likelihood-based analysis of repeated categorical responses. Computational Statistics and Data Analysis 2006; 51:1509-1522.
8. Diggle PJ, Kenward MJ. Informative dropout in longitudinal data analysis. Applied Statistics 1994; 43: 49-94.
getass.drm
, nlm
,
cluster
, Time
profiles.drm
, depratio
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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | ######################################################
## Examples for binary responses
###########################################
## Wheeze among Steubenville (see [3]):
## Latent Beta-distributed propensity
data(wheeze)
fit1 <- drm(wheeze~I(age>9)+smoking+cluster(id),data=wheeze,dep="B", print=0)
## Obesity among Muscatine children (see [2]):
## Analysis for completers: M2 for girls
data(obese)
fit2 <- drm(obese~age+cluster(id)+Time(year), subset=sex=="female",
dep="M2",data=obese)
## Not run:
## Muscatine children continued (see [3]):
## LM for boys and girls separately
fit3 <- drm(obese~age+cluster(id)+Time(age), subset=sex=="male",
dep="LM",data=obese)
fit4 <- drm(obese~age+cluster(id)+Time(age), subset=sex=="female",
dep="LM",data=obese)
## End(Not run)
############################################
## Examples for ordinal responses
############################################
## Movie critic example (see [6]):
## Latent Dirichlet propensities with baseline category link.
data(movie)
options(contrasts=c("contr.treatment","contr.treatment"))
fit5 <- drm(y~critic+cluster(movie), data=movie, dep="D", link="bcl")
## Longitudinal dataset on teenage marijuana use (see [6]):
## Superposition of structures N, L and M for the girls.
data(marijuana)
fit6 <- drm(y~age+cluster(id)+Time(age), data=marijuana,
subset=sex=="female", dep=list("NLM", ~kappa1==1,
~kappa2==0, ~tau12==1, ~tau21==1, ~tau11==tau22))
## Parameter restrictions with functions using M-structure for the boys.
## Plot the second order dependence ratios:
plot(depratio(y~cluster(id)+Time(age), data=marijuana,
subset=sex=="male"))
## fit the model in [6]:
fit7 <- drm(y~age+cluster(id)+Time(age), data=marijuana,
subset=sex=="male", dep=list("M",
tau12~function(a=1,b=0) a+b*c(0:3),
tau21~function(a=1,b=0) a+b*c(0:3)))
## Not run:
##############################################
## Covariates for the association (see [7]):
##############################################
data(madras)
## plot empirical 2nd order dependence ratios with bootstrap CI's
tau.madras <- depratio(symptom~cluster(id)+Time(month), data=madras,
boot.ci = TRUE, n.boot = 1000)
plot(tau.madras, log="y", ylim=c(1,40), plot.ci=TRUE)
## create matrix for profiles:
W.madras <- profiles.drm(n.categories=2, n.repetitions=12, "M")
## create four-level covariate, combining age and sex:
madras$age.sex <- factor(paste(madras$age,madras$sex,sep="."))
## fit the model in [7], Section 4:
fit8 <- drm(symptom~age+sex+month+month:age+month:sex+cluster(id)+Time(month),
data=madras, Ncond=FALSE, save.profiles=FALSE, pmatrix="W.madras",
dep=list("NM",nu~nu:age.sex,
tau~function(a0=0,a1=0) 1+a0*exp(a1*c(0:10))), print=2)
###################################################
## Dropout model on top of regression & association
###################################################
## Continue with the madras data.
## fit a model without the dropout model:
fit9 <- drm(symptom~age+sex+month+month:age+month:sex+cluster(id)+Time(month),
data=madras, save.profiles=FALSE, pmatrix="W.madras", print=0,
dep=list("NM", tau~function(a0=0,a1=0) 1+a0*exp(a1*c(0:10))))
## A dropout model assuming MCAR for the thought disorders:
mcar <- drm(symptom~age+sex+month+month:age+month:sex+cluster(id)+Time(month),
data=madras, save.profiles=FALSE, pmatrix="W.madras",
dep=list("NM", tau~function(a0=0,a1=0) 1+a0*exp(a1*c(0:10)),
~symptom.cur==0,~symptom.prev==0),
dropout=TRUE, start=c(coef(fit9), -4))
## A dropout model assuming MAR; including sex as a covariate:
mar <- drm(symptom~age+sex+month+month:age+month:sex+cluster(id)+Time(month),
data=madras, save.profiles=FALSE, pmatrix="W.madras",
dep=list("NM", tau~function(a0=0,a1=0) 1+a0*exp(a1*c(0:10)),
~symptom.cur==0), dropout=TRUE, drop.x=sex,
start=c(coef(mcar),0,0))
## A dropout model assuming MNAR and sex as a covariate:
mnar <- drm(symptom~age+sex+month+month:age+month:sex+cluster(id)+Time(month),
data=madras, save.profiles=FALSE, pmatrix="W.madras",
dep=list("NM", tau~function(a0=0,a1=0) 1+a0*exp(a1*c(0:10))),
dropout=TRUE, drop.x=sex, start=c(coef(mcar),0,0,0))
## print out coefficients and std.errors:
coef(summary(mnar))
## End(Not run)
## std.error of `symptom.cur' all over the place; too few dropouts
## for a comprehensive evaluation of the dropout mechanism
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.