Description Usage Arguments Details Value Note Author(s) References See Also Examples
fits multivariate marginal models with shared regression parameters for both continous and discrete responses
1 2 3 |
formula |
a formula expression, see the examples given below. |
id |
a vector for identification of the clusters or a single sided formula, see examples. |
data |
an optional data frame. |
rtype |
a logical variable which determines the inclusion of response type indicator variables as new covariates. The default is set to TRUE which corresponds to the inclusion of response types by placing them right after the last covariate in the design matrix. For k multiple responses, k-1 indicator variables are to be created and mmm2 has a systematic way of creating these variables: The first response takes 0 for all the k-1 indicator variables and jth response ( j = 2, ..., k) takes 1 only for the (k-j+1)th indicator variable and takes 0 otherwise. |
interaction |
expects a vector of integers which includes the column number of the covariates (by considering only the covariate matrix, not the whole data) which are to be interacted with the response type indicator variables. These interactions are added as new covariates right after the last response type indicator variable. If rtype is set to FALSE, mmm2 ignores interaction even if it is set to a vector of column numbers of some covariates. |
R |
a user specified square matrix for the working correlation matrix, appropriate when |
b |
user specified initials for the parameter estimates. |
tol |
the tolerance which specifies the convergency of the algorithm. |
maxiter |
the maximum number of iterations to be consumed by the algorithm. |
family |
an object which defines the link and variance function. The possible choices are same with the ones in the |
corstr |
a character string which defines the structure of the working correlation matrix. For details see the |
Mv |
specifies the lag value, e.g. specification of |
silent |
a logical variable which decides the print of the iterations. |
scale.fix |
|
scale.value |
The mmm2
function utilizes the gee
package within.
Returns an onject of the results. See the examples given below.
This is the version 1.2 of this user documentation file.
Ozgur Asar, Ozlem Ilk
Asar, O. (2012). On multivariate longitudinal binary data models and their applications in forecasting. MS Thesis, Middle East Technical University. Available at http://www.lancaster.ac.uk/pg/asar/thesis_Ozgur
Asar, O., Ilk, O. (2013). mmm: an R package for analyzing multivariate longitudinal data with multivariate marginal models. Computer Methods and Programs in Biomedicine, 112 649–654.
Ilk, O., Daniels, M. (2007). Marginalized transition random effects models for multivariate longitudinal binary data. Canadian Journal of Statistics, 35, 105-123.
Liang, K. L., Zeger, S. L. (1986). Longitudinal data analysis using generalized linear models. Biometrika, 73, 13-22.
Shelton, B. J., Gilbert, G. H., Liu, B., Fisher, M. (2004). A SAS macro for the analysis of multivariate longitudinal binary outcomes. Computer Methods and Programs in Biomedicine, 76, 163-175.
Zeger, S. L., Liang, K. L. (1986). Longitudinal data analysis for discrete and continous outcomes. Biometrics, 42, 121-130.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## binary data application
data(Kenya_morbidity)
fit1 <- mmm2(cbind(poor_appetite, headache) ~ visit_num + age_at_onset + boy +
as.factor(treatment), id = ~ ID, data = Kenya_morbidity, interaction = 1 : 6,
family = binomial(link = logit), corstr = "unstructured")
summary(fit1)$coef
## count data application
data(mlcd)
fit2<-mmm2(formula=cbind(mlcd$resp1,mlcd$resp2)~mlcd$X+mlcd$time+
mlcd$X.time,id=mlcd$ID,rtype=TRUE,interaction=1:3,family=poisson,corstr="unstructured")
summary(fit2)$coef
## continuous data application
data(mlgd)
fit3<-mmm2(formula=cbind(mlgd$resp1,mlgd$resp2)~mlgd$X+mlgd$time+
mlgd$X.time,id=mlgd$ID,rtype=TRUE,interaction=1:3,family=gaussian,corstr="unstructured")
summary(fit3)$coef
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.