View source: R/functions_wrapper.R
calculate_bic | R Documentation |
Calculate BIC
Different variations of the BIC can be calculated:
| mixed (default) | BIC = -2LL + n_random_parameters * log(n_individuals) + | n_fixed_parameters * log(n_observations)
| fixed | BIC = -2LL + n_estimated_parameters * log(n_observations)
| random | BIC = -2LL + n_estimated_parameters * log(n_individuals)
| iiv | BIC = -2LL + n_estimated_iiv_omega_parameters * log(n_individuals)
calculate_bic(model, likelihood, type = "mixed")
model |
(Model) Pharmpy model object |
likelihood |
(numeric) -2LL to use |
type |
(str) Type of BIC to calculate. Default is the mixed effects. |
(numeric) BIC of model fit
## Not run:
model <- load_example_model("pheno")
results <- load_example_modelfit_results("pheno")
ofv <- results$ofv
calculate_bic(model, ofv)
calculate_bic(model, ofv, type='fixed')
calculate_bic(model, ofv, type='random')
calculate_bic(model, ofv, type='iiv')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.