Description Usage Arguments Value Author(s) References See Also Examples
View source: R/summary.catpredi.R
Produces a summary of a catpredi object. The following are printed: the call to the catpredi() function; the estimated optimal cut points obtained with the method selected and the estimated AUC and bias corrected AUC (if the argument correct.AUC is TRUE) for the categorised variable.
1 2 |
object |
an object of class catpredi as produced by catpredi() |
digits |
. |
... |
further arguments passed to or from other methods. |
Returns an object of class "summary.catpredi" with the same components as the catpredi
function (see catpredi
). plus:
fit.gam |
fitted model according to the model specified in the call, based on the function |
Irantzu Barrio, Maria Xose Rodriguez-Alvarez and Inmaculada Arostegui
I Barrio, I Arostegui, M.X Rodriguez-Alvarez and J.M Quintana (2015). A new approach to categorising continuous variables in prediction models: proposal and validation. Statistical Methods in Medical Research (in press).
See Also as catpredi
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | library(CatPredi)
set.seed(127)
#Simulate data
n = 200
#Predictor variable
xh <- rnorm(n, mean = 0, sd = 1)
xd <- rnorm(n, mean = 1.5, sd = 1)
x <- c(xh, xd)
#Response
y <- c(rep(0,n), rep(1,n))
#Covariate
zh <- rnorm(n, mean=1.5, sd=1)
zd <- rnorm(n, mean=1, sd=1)
z <- c(zh, zd)
# Data frame
df <- data.frame(y = y, x = x, z = z)
# Select optimal cut points using the AddFor algorithm
res.addfor <- catpredi(formula = y ~ z, cat.var = "x", cat.points = 2,
data = df, method = "addfor", range=NULL, correct.AUC=FALSE)
# Summary
summary(res.addfor)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.