BIC.pk {invivoPKfit} | R Documentation |
Bayesian information criterion
Description
Get the Bayesian information criterion (BIC) for a fitted 'pk' object
Usage
## S3 method for class 'pk'
BIC(object, newdata = NULL, model = NULL, method = NULL, exclude = TRUE, ...)
Arguments
object |
A 'pk' object |
newdata |
Optional: A 'data.frame' with new data for which to compute log-likelihood. If NULL (the default), then BICs will be computed for the data in 'obj$data'. 'newdata' is required to contain at least the following variables: 'Time', 'Time.Units', 'Dose', 'Route','Media', 'Conc', 'Detect', 'N_Subjects'. Before log-likelihood is calculated, 'Time' will be transformed according to the transformation in 'obj$scales$time' and 'Conc' will be transformed according to the transformation in 'obj$scales$conc'. |
model |
Optional: Specify one or more of the fitted models for which to calculate BIC. If NULL (the default), log-likelihoods will be returned for all of the models in 'obj$stat_model'. |
method |
Optional: Specify one or more of the [optimx::optimx()] methods for which to calculate BICs. If NULL (the default), log-likelihoods will be returned for all of the methods in 'obj$settings_optimx$method'. |
exclude |
Logical: 'TRUE' to compute the AIC after removing any observations in the data marked for exclusion (if there is a variable 'exclude' in the data, an observation is marked for exclusion when 'exclude status. Default 'TRUE'. |
... |
Additional arguments. Not in use. |
Details
The BIC is calculated from the log-likelihood (LL) as follows:
\textrm{BIC} = -2\textrm{LL} + \log(n_{obs}) n_{par}
where n_{par}
is the number of parameters in the fitted model.
Note that the BIC is just the AIC with k = \log(n_{obs})
.
Value
A data.frame with log-likelihood values and calculated BIC using 'newdata'. There is one row for each model in ‘obj'’s [stat_model()] element and each [optimx::optimx()] method (specified in [settings_optimx()]).
Author(s)
Caroline Ring, Gilberto Padilla Mercado
See Also
Other fit evaluation metrics:
AAFE.pk()
,
AFE.pk()
,
AIC.pk()
,
logLik.pk()
,
rmse.pk()
,
rsq.pk()
Other log likelihood functions:
AIC.pk()
,
logLik.pk()
Other methods for fitted pk objects:
AAFE.pk()
,
AFE.pk()
,
AIC.pk()
,
coef.pk()
,
coef_sd.pk()
,
eval_tkstats.pk()
,
get_fit.pk()
,
get_hessian.pk()
,
get_tkstats.pk()
,
logLik.pk()
,
predict.pk()
,
residuals.pk()
,
rmse.pk()
,
rsq.pk()