False Positive Rate Uno
Estimates the predictive false positive rate (fpr) based on cross validation and generalized, linear models (see glm
). The concept was suggested by Uno et al. (see references)
fprUno(timepoint, dataSet, trainIndices, survModelFormula, censModelFormula, linkFunc = "logit", idColumn = NULL, timeAsFactor=TRUE)
timepoint |
Discrete time interval given that the false positive rate is evaluated (integer scalar) |
dataSet |
Original data in short format. Should be of class "data.frame". |
trainIndices |
List of Indices from original data used for training (list of integer vectors). The length of the list is equal to the number of cross validation samples. |
survModelFormula |
Formula of the discrete survival model. It is used in a generalized, linear model. |
censModelFormula |
Formula of the censoring model. It is used in a generalized, linear model. Usually this is done without covariates. |
linkFunc |
Link function of the generalized, linear model. |
idColumn |
Name of the column with identification numbers of persons. Default NULL means, that each row equals one person (no repeated measurements). |
timeAsFactor |
Should the time intervals be coded as factor? Default is to use factor. If the argument is false, the column is coded as numeric. |
Output: List with objects:
Output: Data frame with two columns: "cutoff" gives the different marker values and "fpr" the false positive rates
Input: A list of given argument input values (saved for reference). In addition there is the list element orderMarker
, which gives the indices of the marker values in increasing order.
Thomas Welchowski welchow@imbie.meb.uni-bonn.de
Matthias Schmid matthias.schmid@imbie.uni-bonn.de
Matthias Schmid, Gerhard Tutz and Thomas Welchowski, (2017), Discrimination Measures for Discrete Time-to-Event Predictions, Econometrics and Statistics, Elsevier, Doi: 10.1016/j.ecosta.2017.03.008
Hajime Uno and Tianxi Cai and Lu Tian and L. J. Wei, (2007), Evaluating Prediction Rules for t-Year Survivors With Censored Regression Models, Journal of the American Statistical Association
Patrick J. Heagerty and Yingye Zheng, (2005), Survival Model Predictive Accuracy and ROC Curves, Biometrics 61, 92-105
# Example with cross validation and unemployment data library(Ecdat) library(caret) data(UnempDur) summary(UnempDur$spell) # Extract subset of data set.seed(635) IDsample <- sample(1:dim(UnempDur)[1], 100) UnempDurSubset <- UnempDur [IDsample, ] head(UnempDurSubset) range(UnempDurSubset$spell) set.seed(7550) CVfolds <- createFolds (y=UnempDurSubset$spell, returnTrain=TRUE, k=2) # Estimate false positive rate of time interval 7: tryFPR <- fprUno (timepoint=7, dataSet=UnempDurSubset, trainIndices=CVfolds, survModelFormula=spell ~ age + logwage, censModelFormula=censor1 ~ 1, linkFunc="logit", idColumn=NULL, timeAsFactor=FALSE) tryFPR plot(tryFPR)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.