Learn R Programming

ModelGood (version 1.0.9)

predictStatusProb: Probability Predictions

Description

Function to extract probabilistic event status predictions from various diagnostic and prognostic models with binary status response. The function has a speficic method depending on the 'class' of the object.

Usage

"predictStatusProb"(object,newdata,...)

Arguments

object
A model from which predicted probabilities can be extracted for the indiviuals in newdata.
newdata
A data frame containing data for which the object can provide predict probabilities. In medical applications newdata will typically consist of the data of patients whose data were not used for building the model.
...
Additional arguments that are passed on to the current method.

Value

A vector with the predicted status probability for each row in NROW(newdata).

Details

The function delivers predicted probabilities tailored for the model performance measures of the package. These probabilities are extracted from a fitted model of class CLASS with the function predictStatusProb.CLASS. See help(Roc) for details.

See Also

predict,Roc

Examples

Run this code
library(rms)
set.seed(7)
x <- abs(rnorm(20))
d <- data.frame(y=rbinom(20,1,x/max(x)),x=x,z=rnorm(20))
nd <- data.frame(y=rbinom(8,1,x/max(x)),x=abs(rnorm(8)),z=rnorm(8))
fit <- lrm(y~x+z,d)
predictStatusProb(fit,newdata=nd)

Run the code above in your browser using DataLab