coef.pk {invivoPKfit} | R Documentation |
Get coefficients
Description
Extract coefficients from a fitted [pk()] object
Usage
## S3 method for class 'pk'
coef(
object,
model = NULL,
method = NULL,
drop_sigma = FALSE,
include_NAs = FALSE,
include_type = "use",
suppress.messages = NULL,
...
)
Arguments
object |
A [pk()] object |
model |
Optional: Specify (as a 'character' vector) one or more of the fitted models whose coefficients to return. If 'NULL' (the default), coefficients will be returned for all of the models in 'obj$stat_model'. |
method |
Optional: Specify (as a 'character' vector)one or more of the [optimx::optimx()] methods whose coefficients to return. If 'NULL' (the default), coefficients will be returned for all of the models in 'obj$settings_optimx$method'. |
drop_sigma |
Logical: 'FALSE' by default. Determines whether to include sigma in the output. |
include_NAs |
Logical: 'FALSE' by default. Determines whether to include aborted fits which have NAs as coefficients. |
include_type |
Character: '"use"' (default) will return all parameters used in evaluating the model, including those that were held constant. '"optimize"' will return only parameters that were optimized, dropping all that were held constant. '"constant"' will return *only* parameters that were held constant (used, but not optimized). ('"optimize"' and '"constant"' are useful, for example, when evaluating the Hessian of the log-likelihood function, which requires differentiating between parameters that were optimized and those that were held constant.) Any value other than '"use"', '"optim"', or '"const"' will return an error. |
suppress.messages |
Logical: 'NULL' by default to use the setting in 'object$settings_preprocess$suppress.messages'. Determines whether to display messages. |
... |
Additional arguments currently not in use. |
Details
This function extracts fitted model parameter values from a fitted [pk()] object.
Value
A data.frame with a row for each 'data_group' x 'method' x 'model' combination in a fitted [pk()] object. When 'drop_sigma = TRUE' there is also a row for each unique standard deviation hyper-parameter defined by 'error_group' in the fitted [pk()] object. There is a column for all parameter estimates given each model in 'model'. A list-column 'coefs_vector' summarizes all estimated parameters into a named vector. This named vector is used in functions that call upon the model functions, such as [predict()].
Author(s)
Caroline Ring, Gilberto Padilla Mercado
See Also
Other methods for fitted pk objects:
AAFE.pk()
,
AFE.pk()
,
AIC.pk()
,
BIC.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()