coef.mfp2: Extract Coefficients from an 'mfp2' Model

View source: R/mfp2.R

coef.mfp2R Documentation

Extract Coefficients from an mfp2 Model

Description

Returns coefficients from a fitted mfp2() model. This is a method for the generic stats::coef() function.

Usage

## S3 method for class 'mfp2'
coef(object, ...)

Arguments

object

A fitted mfp2() object.

...

Not used.

Value

A named numeric vector for scalar-response models. For multinomial models, a matrix with one row per non-reference outcome and one column per fitted term; powers are common across rows but coefficients are outcome specific.

See Also

mfp2(), summary.mfp2(), predict.mfp2()

Examples

data("prostate")
fit <- mfp2(
  lpsa ~ fp(age) + fp(cavol) + fp(weight) + svi,
  data = prostate,
  verbose = FALSE
)
coef(fit)


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