README.md

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:

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



Try the mfp2 package in your browser

Any scripts or data that you put into this service are public.

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