create_fp_terms: Helper to create overview table of fp terms

View source: R/fit_mfp.R

create_fp_termsR Documentation

Helper to create overview table of fp terms

Description

To be used in fit_mfp().

Usage

create_fp_terms(fp_powers, acdx, df, select, alpha, criterion)

Arguments

fp_powers

powers of the created FP terms.

acdx

a logical vector of length nvars indicating which continuous variables should undergo the approximate cumulative distribution (ACD) transformation.

df

a numeric vector of length nvars of degrees of freedom.

select

a numeric vector of length nvars indicating significance levels for backward elimination.

alpha

a numeric vector of length nvars indicating significance levels for tests between FP models of different degrees.

criterion

a character string defining the criterion used to select variables and FP models of different degrees.

Value

Dataframe with overview of all fp terms. Each row represents a variable, with rownames giving the name of the variable. Variables with acd transformation are prefixed by A_ by the print and summary methods. The dataframe comprises the following columns:

  • df_initial: initial degrees of freedom.

  • select: significance level for backward elimination.

  • alpha: significance level for fractional polyomial terms.

  • selected: logical value encoding presence in the model.

  • df_final: final estimated degrees of freedom.

  • acd: logical value encoding use of ACD transformation.

  • powerN: one or more columns with the final estimated fp powers (numbered 1 to N).


mfp2 documentation built on Nov. 15, 2023, 1:06 a.m.