Multivariable Fractional Polynomial Models with Extensions

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) 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) . This feature distinguishes it from a standard fractional polynomial function, which lacks the ability to achieve such modeling.


mfp2

Overview

mfp2 implements multivariable fractional polynomial (MFP) models and various extensions. It allows the selection of variables and functional forms when modelling the relationship of a data matrix x and some outcome y. Currently, it supports generalized linear models and Cox proportional hazards models. Additionally, it has the ability to model a sigmoid relationship between covariate x and an outcome variable y using approximate cumulative distribution (ACD) transformation- a feature that a standard fractional polynomial function cannot achieve.

Compatibility with existing software packages

mfp2 closely emulates the functionality of the mfp and mfpa package in Stata.

It augments the functionality of the existing mfp package in R by:

  • a matrix and a formula interface for input
  • sigmoid transformations via the ACD transformation
  • estimation and plotting of contrasts and partial linear predictors to investigate and visualize non-linear effects
  • various optimizations to increase speed and user friendliness

Installation

# Install the development version from GitHub
# install.packages("pak")
pak::pak("EdwinKipruto/mfp2")

# or 
# install.packages("remotes")
remotes::install_github("EdwinKipruto/mfp2")

R-CMD-check

References

To learn more about the MFP algorithm, a good place to start is the book by Royston, P. and Sauerbrei, W., 2008. Multivariable Model - Building: A Pragmatic Approach to Regression Analysis based on Fractional Polynomials for Modelling Continuous Variables. John Wiley & Sons.

For insights into the ACD transformation, please refer to Royston (2014). A smooth covariate rank transformation for use in regression models with a sigmoid dose–response function. The Stata Journal

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("mfp2")

1.0.1 by Edwin Kipruto, a year ago


https://github.com/EdwinKipruto/mfp2


Report a bug at https://github.com/EdwinKipruto/mfp2/issues


Browse source code at https://github.com/cran/mfp2


Authors: Edwin Kipruto [aut, cre] , Michael Kammer [aut] , Patrick Royston [aut] , Willi Sauerbrei [aut]


Documentation:   PDF Manual  


GPL-3 license


Imports ggplot2, stats, survival, utils

Suggests knitr, testthat, xfun, rmarkdown, formatR, patchwork, spelling


Imported by ctlr, midoc, test2norm.


See at CRAN