Obtain empirical start value for unstructured covariance
Usage
emp_start(data, model_formula, visit_var, subject_var, subject_groups, ...)
Arguments
- data
(data.frame
)
data used for model fitting.
- model_formula
(formula
)
the formula in mmrm model without covariance structure part.
- visit_var
(string
)
visit variable.
- subject_var
(string
)
subject id variable.
- subject_groups
(factor
)
subject group assignment.
- ...
not used.
Value
A numeric vector of starting values.
Details
This emp_start
only works for unstructured covariance structure.
It uses linear regression to first obtain the coefficients and use the residuals
to obtain the empirical variance-covariance, and it is then used to obtain the
starting values.
Note
data
is used instead of full_frame
because full_frame
is already
transformed if model contains transformations, e.g. log(FEV1) ~ exp(FEV1_BL)
will
drop FEV1
and FEV1_BL
but add log(FEV1)
and exp(FEV1_BL)
in full_frame
.