mult.reg_1level {mult.latent.reg} | R Documentation |
Selecting the best results for multivariate one level model
Description
This wrapper function runs multiple times the function mult.em_1level for fitting Zhang and Einbeck's (2024) multivariate response models with one-level random effect, and select the best results with the smallest AIC value.
Arguments
data |
A data set object; we denote the dimension of a data set to be |
v |
Covariate(s). |
K |
Number of mixture components, the default is |
steps |
Number of iterations within each |
num_runs |
Number of function iteration runs, the default is |
start |
Containing parameters involved in the proposed model ( |
option |
Four options for selecting the starting values for the parameters in the model. The default is |
var_fun |
There are four types of variance specifications;
|
Value
The best estimated result (with the smallest AIC value) in the model (Zhang and Einbeck, 2024) x_{i} = \alpha + \beta z_k + \Gamma v_i + \varepsilon_i
obtained through the EM algorithm.
p |
The estimates for the parameter |
alpha |
The estimates for the parameter |
z |
The estimates for the parameter |
beta |
The estimates for the parameter |
gamma |
The estimates for the parameter |
sigma |
The estimates for the parameter |
W |
The posterior probability matrix. |
loglikelihood |
The approximated log-likelihood of the fitted model. |
disparity |
The disparity ( |
number_parameters |
The number of parameters estimated in the EM algorithm. |
AIC |
The AIC value ( |
BIC |
The BIC value ( |
aic_data |
All AIC values in each run. |
Starting_values |
Lists of starting values for parameters used in each |
References
Zhang, Y. and Einbeck J. (2024). A Versatile Model for Clustered and Highly Correlated Multivariate Data. J Stat Theory Pract 18(5).doi:10.1007/s42519-023-00357-0
See Also
Examples
##run the mult.em_1level() multiple times and select the best results with the smallest AIC value
set.seed(7)
results <- mult.reg_1level(fetal_covid_data[,c(1:5)],v=fetal_covid_data$status_bi,
K=3, num_runs = 5,steps = 20, var_fun = 2, option = 1)
##Reproduce the best result: the best result is the 5th run in the above example.
rep_best_result <- mult.em_1level(fetal_covid_data[,c(1:5)],
v=fetal_covid_data$status_bi,
K=3, steps = 20, var_fun = 2, option = 1,
start = results$Starting_values[[5]])