View source: R/fitCorrelationTest.R
getModelTable | R Documentation |
getModelTable
extracts key statistics from a list of fitted corHMM
models and returns a summary table. The table includes the number of parameters, log-likelihood, and model selection criteria such as AIC, delta AIC, and AIC weights.
getModelTable(model_list, type = "AIC")
model_list |
A list of |
type |
The type of model selection criterion to use. Options are |
This function takes a list of models fitted using corHMM
and calculates key statistics for comparison across models. Specifically, it calculates the number of parameters, log-likelihood, the chosen model selection criterion (e.g., AIC), the difference in the criterion relative to the best model (delta AIC), and the relative model weight based on the criterion.
getModelTable
can handle different model selection criteria such as AIC, AICc, and BIC by specifying the type
argument.
A data frame with the following columns:
np
: The number of parameters in the model.
lnLik
: The log-likelihood of the model.
AIC
(or the value of type
): The model selection criterion value.
dAIC
: The difference in the criterion between the model and the best model (i.e., the model with the minimum criterion value).
AICwt
: The Akaike weights, representing the relative likelihood of the model given the data.
James D. Boyko
corHMM
for fitting hidden Markov models to phylogenetic data.
# Assuming you have a list of fitted corHMM models:
#models <- list(model1, model2, model3)
#getModelTable(models)
# To use BIC instead of AIC:
#getModelTable(models, type = "BIC")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.