get_mmm_derivatives | R Documentation |
Run mixed models without iterating and return subject level derivatives
get_mmm_derivatives( stacked_data, id, fixed, random, pairs, model_families, start_values, nAGQ = 11 )
stacked_data |
A list of data.frames returned by the stack_data() function |
id |
The name of the column with subject ids in stacked_data |
fixed |
A formula (as character string) for the fixed part of the mixed model. Passed to as.formula(). |
random |
A formula (as character string) for the random part of the mixed model. Passed to as.formula(). |
pairs |
A character matrix with pairs returned by the make_pairs function. |
model_families |
A list with the model families returned by the test_input_datatypes() function. |
start_values |
A list (length == length(stacked_data)) with start values returned by the get_start_values() function. |
nAGQ |
The number of knots to use on the Adapative Gaussian Quadrature (passed to GLMMadaptive::mixed_model()). |
This function uses the start values determined in by the function get_start_values() to determine the subject level contributions to the derivatives. In turn these are used to average the parameters and standard errors for the full multivariate mixed model.
A list of length nrow(pairs) each with two elements:
df_hessiansa list with data.frames storing the subject level Hessians
df_gradientsa list with data.frames storing the subject level gradients
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.