mmrm_tmb Objectscomponent(
object,
name = c("cov_type", "subject_var", "n_theta", "n_subjects", "n_timepoints", "n_obs",
"beta_vcov", "beta_vcov_complete", "varcor", "score_per_subject", "formula",
"dataset", "n_groups", "reml", "convergence", "evaluations", "method", "optimizer",
"conv_message", "call", "theta_est", "beta_est", "beta_est_complete", "beta_aliased",
"x_matrix", "x_matrix_complete", "y_vector", "neg_log_lik", "jac_list", "theta_vcov",
"full_frame", "xlev", "contrasts")
)The corresponding component of the object, see details.
(mmrm_tmb)
the fitted MMRM.
(character)
the component(s) to be retrieved.
Available component() names are as follows:
call: low-level function call which generated the model.
formula: model formula.
dataset: data set name.
cov_type: covariance structure type.
n_theta: number of parameters.
n_subjects: number of subjects.
n_timepoints: number of modeled time points.
n_obs: total number of observations.
reml: was REML used (ML was used if FALSE).
neg_log_lik: negative log likelihood.
convergence: convergence code from optimizer.
conv_message: message accompanying the convergence code.
evaluations: number of function evaluations for optimization.
method: Adjustment method which was used (for mmrm objects),
otherwise NULL (for mmrm_tmb objects).
beta_vcov: estimated variance-covariance matrix of coefficients
(excluding aliased coefficients). When Kenward-Roger/Empirical adjusted
coefficients covariance matrix is used, the adjusted covariance matrix is returned (to still obtain the
original asymptotic covariance matrix use object$beta_vcov).
beta_vcov_complete: estimated variance-covariance matrix including
aliased coefficients with entries set to NA.
varcor: estimated covariance matrix for residuals. If there are multiple
groups, a named list of estimated covariance matrices for residuals will be
returned. The names are the group levels.
score_per_subject: score per subject in empirical covariance.
See the vignette vignette("coef_vcov", package = "mmrm").
theta_est: estimated variance parameters.
beta_est: estimated coefficients (excluding aliased coefficients).
beta_est_complete: estimated coefficients including aliased coefficients
set to NA.
beta_aliased: whether each coefficient was aliased (i.e. cannot be estimated)
or not.
theta_vcov: estimated variance-covariance matrix of variance parameters.
x_matrix: design matrix used (excluding aliased columns).
x_matrix_complete: design matrix used, including aliased columns.
xlev: a named list of character vectors giving the full set of levels to be assumed for each factor.
contrasts: a list of contrasts used for each factor.
y_vector: response vector used.
jac_list: Jacobian, see h_jac_list() for details.
full_frame: data.frame with n rows containing all variables needed in the model.
In the lme4 package there is a similar function getME().
fit <- mmrm(
formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
data = fev_data
)
# Get all available components.
component(fit)
# Get convergence code and message.
component(fit, c("convergence", "conv_message"))
# Get modeled formula as a string.
component(fit, c("formula"))
Run the code above in your browser using DataLab