Description Usage Arguments Details Value References See Also Examples
Produces an object of class "MargCond"
which is a marginalconditional multivariate model.
1 2 
formula 
a twosided linear formula object similar to those in 
data 
a data frame in which to interpret the variables occuring in the 
ID 
a vector which identifies the clusters. The length of 
tol 
the tolerance used in the fitting algorithm. 
max.iter 
the maximum number of iterations for the ES algorithm. 
corstr 
a character string specifying the correlation structure.
The following are permitted:

silent 
a logical variable controlling whether an indication at each iteration is printed. 
The joint marginalconditional model
Care should be taken when specifying the random effects structure (see the singular models section of https://bbolker.github.io/mixedmodelsmisc/glmmFAQ.html). As initial estimates for the expectationsubstitution algorithm are taken from the univariate mixed model fits, we recommend that these models be fit separately first and examined to ensure that they are not over parameterized.
An object of class "MargCond"
representing the fit.
An object of class "MargCond"
is a list containing the following components:
coefficients 
a named vector of coefficients. 
sigma 
a named vector of outcome error standard deviations. 
SE 
a vector of coefficient, random effect, and error standard deviations. 
residuals 
the residuals, that is response minus fitted values. 
working.correlation 
the working correlation returned by the GEE step at convergence. 
rand.eff 
the random effect covariance matrix. 
outcomes 
vector of outcome names 
Call 
the matched call. 
v.cov 
the scaled covariance matrix of theta 
obs 
the total number of observations 
groups 
the total number of clusters 
converge 
logical indicator of whether the expectationsubstitution algorithm converged (i.e. the difference between each element of theta from the previous iteration is smaller than 
Proudfoot J. A., Faig W., Natarajan L., and Xu R. (2018) A joint marginalconditional model for multivariate longitudinal data. Statistics in Medicine. https://doi.org/10.1002/sim.7552
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  set.seed(2112)
NN = 80
n_times = 1:3
## Simulating some data
simdat < simDat(n = NN,
fixed_effects = list(c(1, 1, 2), c(1.5, 1, 3)),
rand_effects = list(1, 1),
error_var = c(4, 4),
error_structure = 'normal',
rho = .35,
times = n_times,
X = cbind(rep(1, NN * length(n_times)),
rnorm(NN * length(n_times), 0, 2),
rbinom(NN * length(n_times), 1, .5)),
Z = cbind(rep(1, NN * length(n_times))))
## Adding random missing values
aa < sample(1:nrow(simdat), 10, replace = TRUE)
bb < sample(1:7, 10, replace = TRUE)
for (i in 1:length(aa)) {
simdat[aa[i], bb[i]] < NA
}
## A fit for this simulated multivariate longitudinal data,
## including a random intercept and exchangeable correlation
## structure.
summary(MargCond(c(outcome1, outcome2) ~ X2 + X3 + (1  ID),
data = simdat, ID = simdat$ID, corstr = "exchangeable"))

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.