component {mmrm} | R Documentation |
Component Access for mmrm_tmb
Objects
Description
Usage
component(
object,
name = c("cov_type", "subject_var", "n_theta", "n_subjects", "n_timepoints", "n_obs",
"beta_vcov", "beta_vcov_complete", "varcor", "formula", "dataset", "n_groups",
"reml", "convergence", "evaluations", "method", "optimizer", "conv_message", "call",
"theta_est", "beta_est", "beta_est_complete", "beta_aliased", "x_matrix", "y_vector",
"neg_log_lik", "jac_list", "theta_vcov", "full_frame")
)
Arguments
object |
( |
name |
( |
Details
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 ifFALSE
). -
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 (formmrm
objects), otherwiseNULL
(formmrm_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 useobject$beta_vcov
). -
beta_vcov_complete
: estimated variance-covariance matrix including aliased coefficients with entries set toNA
. -
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. -
theta_est
: estimated variance parameters. -
beta_est
: estimated coefficients (excluding aliased coefficients). -
beta_est_complete
: estimated coefficients including aliased coefficients set toNA
. -
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). -
y_vector
: response vector used. -
jac_list
: Jacobian, seeh_jac_list()
for details. -
full_frame
:data.frame
withn
rows containing all variables needed in the model.
Value
The corresponding component of the object, see details.
See Also
In the lme4
package there is a similar function getME()
.
Examples
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"))