Description Usage Arguments Value Examples

`perf.auc`

checks model performance for a given model object,
using the training and test dataset.

1 | ```
perf.auc(model, train, test)
``` |

`model` |
The GLM or survival model (coxph) object. |

`train` |
The training dataset |

`test` |
The test dataset |

For a GLM model, it returns the ROC curve and the AUC values for the training and test datasets respectively. For a survival model, it returns the time-dependent AUC at each time step and the integrated AUC value (iAUC)

1 2 3 4 5 6 7 8 9 | ```
data <- rpart::stagec
data <- data[sample(nrow(data), 10000, replace = TRUE), ]
data <- na.omit(data)
ind.train <- caret::createDataPartition(data$pgstat, p = .7, list = FALSE)
dt.train <- data[ind.train, ]
dt.test <- data[-ind.train, ]
mod <- glm(pgstat ~ ., dt.train, family=binomial(link='logit'))
perf.auc(mod, dt.train, dt.test)
``` |

JianhuaHuang/streamlineR documentation built on Aug. 19, 2018, 6:59 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.