Learn R Programming

stepPenal (version 0.2)

penalBrier: Evaluation of the performance of risk prediction models with binary status response variable.

Description

Evaluation of the performance of risk prediction models with binary status response variable.

Usage

penalBrier(Data, coeffP)

Arguments

Data

a data matrix; in the first column there should be the response variable y. If you give the training dataset it will calculate the Brier score.

coeffP

a named vector of coefficients

Value

the Brier score (misclassification error)

Details

Brier score is a measure for classification performance of a binary classifier. Its values range between [0,1] and the closest is to 0 the better the classifier is. The area under the curve and the Brier score is used to summarize and compare the performance.

References

Brier, G. W. (1950). Verification of forecasts expressed in terms of probability. Monthly Weather Review 78.

Examples

Run this code
# NOT RUN {
# use the penalBrier function on a simulated dataset, with given lamda and w.
# }
# NOT RUN {
set.seed(14)
beta    <- c(3, 2, -1.6, -4)
noise   <- 5
simData <- SimData(N=100,beta=beta, noise=noise, corr=FALSE)

before   <- Sys.time()
stepPenal<- StepPenal(Data=simData, lamda=1.2, w=0.4)
(totRun  <- Sys.time() - before)

(coeff<- stepPenal$coeffP)
 me <- penalBrier(simData,coeff)
# }

Run the code above in your browser using DataLab