Learn R Programming

coxphw (version 4.0.3)

fp.power: Provides Fractional Polynomials as Accessible Function

Description

Provides fractional polynomials as accessible function.

Usage

fp.power(z, a, b = NULL)

Value

A matrix with one or two columns (if a second power b was specified), and number of rows equal to the length of z. The columns are sorted by descending power.

Arguments

z

a scalar or vector of positive numerical values.

a

first power.

b

optional second power.

Author

Georg Heinze

Details

The function returns fp(a) of z (and optionally fp(b) of z).

References

Royston P and Altman D (1994). Regression Using Fractional Polynomials of Continuous Covariates: Parsimonious Parametric Modelling. J R STAT SOC C-APPL 43, 429-467.

Royston P and Sauerbrei W (2008). Multivariable Model-Building. A Pragmatic Approach to Regression Analysis Based on Fractional Polynomials for Modelling Continuous Variables. Wiley, Chichester, UK.

See Also

coxphw

Examples

Run this code
fp.power(z = c(1, 4, 6), a = 1)
fp.power(z = c(1, 4, 6), a = 0.5)
fp.power(z = c(1, 4, 6), a = 0.5, b = 0.5)
fp.power(z = c(1, 4, 6), a = 0, b = 2)

Run the code above in your browser using DataLab