Fractional polynomial regression with one independent variable | R Documentation |
Fractional polynomial regression with one independent variable.
fp(y, x, aa, di = NULL, type = "normal", full = FALSE, seb = FALSE,
tol = 1e-07, maxiters = 100)
y |
The dependent variable, a numerical vector. |
x |
A vector, the independent variable. |
aa |
A vector with two values indicating the range of the optimal value of |
di |
This is valid only for the Weibull regression. A vector with 1s and 0s indicating the censored value. The value of 1 means uncesored value, whereas the value of 0 means censored value. |
type |
The type of regression model: "normal", "logistic", "poisson", "spml" (SPML regression), "gamma", "normlog", "weibull", "negbin". |
full |
If this is FALSE, the coefficients and the deviance will be returned only. If this is TRUE, more information is returned. |
seb |
Do you want the standard error of the estimates to be returned? TRUE or FALSE. |
tol |
The tolerance value to terminate the Newton-Raphson algorithm. |
maxiters |
The max number of iterations that can take place in each regression. |
The independent variable is power transformed and this function searches for the optimal power.
A list including:
a |
The power that yields the optimal fit. |
mod |
The model with the independent variable power transformed. |
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
Royston P. and Altman D. G. (1994). Regression using fractional polynomials of continuous covariates: parsimonious parametric modelling. Journal of the Royal Statistical Society: Series C (Applied Statistics), 43(3): 429-453.
logistic_only, poisson_only
y <- rnorm(100)
x <- abs( rnorm(100) )
mod <- fp(y, x, c(-2, 2) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.