Multivariable Fractional Polynomial Models with Extensions
Function to apply Approximate Cumulative Distribution (ACD)
Shift and scale vector x
Helper to assign degrees of freedom
Backscale Columns of a Matrix (Internal)
Helper to calculates the final degrees of freedom for the selected mod...
Function to compute F-statistic and p-value from deviances
Function to calculate p-values for likelihood-ratio test
Function to compute model metrics to be used within mfp2
Calculates the total number of fractional polynomial powers in adjustm...
Helper function to compute standard error of a partial predictor
Simple function to center data
Extract coefficients from object of class mfp2
Helper to convert a nested list with same or different length into a m...
Simple function to create dummy variables for ordinal and nominal vari...
Helper to create overview table of fp terms
Deviance computations as used in mfp in stata
Helper function to ensure vectors have a specified length
Helper to run cycles of the mfp algorithm
Function to estimate the best FP functions for a single variable
Function to fit univariable FP1 models for acd transformation
Function to find the best FP functions of given degree for a single va...
Function that calculates an integer used to scale predictor
Function that calculates a value used to shift predictor
Function to estimate approximate cumulative distribution (ACD)
Function that fits Cox proportional hazards models
Function that fits generalized linear models
Function to fit linear model for variable of interest
Function for fitting a model using the MFP or MFPA algorithm
Function that fits models supported by mfp2
Function to fit null model excluding variable of interest
Helper to assign attributes to a variable undergoing FP-transformation
Plot response functions from a fitted mfp2 object
Helper function to generate combinations with replacement
Function that generates a matrix of FP powers for any degree
Function to generate all requested FP transformations for a single var...
Helper function to extract selected variables from fitted mfp2 objec...
Multivariable Fractional Polynomial Models with Extensions
Helper function to name transformed variables
Helper to order variables for mfp2 algorithm
Predict Method for mfp2
Helper function to prepare newdata for predict function
Function for verbose printing of function selection procedure (FSP)
Print method for objects of class mfp2
Helper to reset acd transformation for variables with few values
Function selection procedure based on information criteria
Helper to select between null and linear term for a single variable
Function selection procedure for ACD based on closed testing procedure
Function selection procedure based on closed testing procedure
Summarizing mfp2 model fits
Function to extract and transform adjustment variables
Function to transform each column of matrix using final FP powers or a...
Functions to transform a variable using fractional polynomial powers o...
Simple function to transform vector by a single power
Multivariable fractional polynomial algorithm simultaneously selects variables and functional forms in both generalized linear models and Cox proportional hazard models. Key references are Royston and Altman (1994) <doi:10.2307/2986270> and Royston and Sauerbrei (2008, ISBN:978-0-470-02842-1). In addition, it can model a sigmoid relationship between variable x and an outcome variable y using the approximate cumulative distribution transformation proposed by Royston (2014) <doi:10.1177/1536867X1401400206>. This feature distinguishes it from a standard fractional polynomial function, which lacks the ability to achieve such modeling.