print.mfp2: Print a Fitted MFP Model

print.mfp2R Documentation

Print a Fitted MFP Model

Description

Displays the choices made by mfp2() and the resulting fitted model. Use print(fit) for the full report, or set detailed_settings = FALSE for a shorter view.

Usage

## S3 method for class 'mfp2'
print(x, detailed_settings = TRUE, notes = TRUE, intercepts = NULL, ...)

Arguments

x

A fitted mfp2 object.

detailed_settings

Show the Detailed Settings table. Default TRUE; set to FALSE for a shorter report.

notes

Show explanatory notes beneath the settings and model-fit sections. Default TRUE.

intercepts

Show ordinal threshold intercepts. By default (NULL), they are shown when there are fewer than 10 thresholds; use TRUE or FALSE to override this. Has no effect for other model families.

...

Additional print arguments. Use digits to choose the number of decimal places for displayed values (default 3); FP powers and degrees of freedom retain their own formatting.

Details

The report shows the original call and model details, selected and excluded variables, preprocessing, selected functions, final coefficients with standard errors, and model-fit statistics. Preprocessing shifts and scales display without unnecessary trailing zeros, independently of the digits print setting.

Function choices are grouped by type: standard MFP, approximate cumulative distribution (ACD), and spike-at-zero (SAZ). Selected variables appear before excluded variables in each table. In the SAZ table, prop_zero is the proportion of fitting observations with a structural zero; binary denotes an indicator for x = 0. For SAZ variables, the continuous component is transformed only when x > 0.

The optional Detailed Settings table shows each variable's initial and final degrees of freedom, selection settings, and transformation flags. The coefficients table labels each fitted basis term and its standard error. If the fit was centered, it also displays the centering constant and explains how to read the estimate.

Model-fit measures depend on the family. GLMs report deviances, Cox models report minus twice the partial log likelihood, and other families display their applicable statistics. Multinomial fits show one coefficient block per non-reference outcome. Ordinal fits may include threshold intercepts.

Value

Invisibly returns x, allowing the fitted object to be reused.

See Also

mfp2(), summary.mfp2()

Examples

data("prostate")
fit <- mfp2(lpsa ~ fp(age) + svi, data = prostate,
            select = 1, alpha = 1, verbose = FALSE)
print(fit, detailed_settings = FALSE)


mfp2 documentation built on Nov. 14, 2026, 1:06 a.m.