Description Usage Arguments Details Value Note Author(s) See Also Examples
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.
1 2  ## S3 method for class 'glm'
predictStatusProb(object,newdata,...)

object 
A model from which predicted probabilities can be extracted for the indiviuals in newdata. 
newdata 
A data frame containing data for which the

... 
Additional arguments that are passed on to the current method. 
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.
A vector with the predicted status probability for each row
in NROW(newdata)
.
It is rather easy to write a new predictStatusProb method,
see help(Roc)
. However, if you do not succeed,
please send me an email.
The performance, in particular when doing crossvalidation where the model is evaluated many times, can be improved by supressing in the call to the model all the computations that are not needed for probability prediction, for example standard error calculations.
Thomas A. Gerds tag@biostat.ku.dk
1 2 3 4 5 6 7  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)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.