calculate_model_metrics {mfp2}R Documentation

Function to compute model metrics to be used within mfp2

Description

Mostly used within an mfp step to compare between the different fp models of a variable.

Usage

calculate_model_metrics(obj, n_obs, df_additional = 0)

Arguments

obj

a list returned by fit_model() representing a glm or Cox model fit.

n_obs

a numeric value indicating the number of observations for the data used to fit obj.

df_additional

a numeric value indicating the number of additional degrees of freedom to be accounted for in the computations of AIC and BIC. These may be necessary when a model uses FP terms, as these add another degree of freedom per estimated power.

Value

A numeric vector with the following entries:

References

Royston, P. and Sauerbrei, W., 2008. Multivariable Model - Building: A Pragmatic Approach to Regression Anaylsis based on Fractional Polynomials for Modelling Continuous Variables. John Wiley & Sons.


[Package mfp2 version 1.0.0 Index]