Learn R Programming

OOmisc (version 1.2)

ePCP: Function to calculate expected proportion of correct prediction (ePCP).

Description

Calculates ePCP and the related (1-$\alpha$)$\%$ (approximate) confidence intervals for a given set of predicted success probabilities and the observed (binary) values.

Usage

ePCP(fit, y, alpha = 0.05)

Arguments

fit
a vector or matrix which includes the predicted success probabilities
y
a vector or matrix which includes the observed binary values
alpha
a numeric value for type I error

Value

Returns a matrix of output including the point estimate of the ePCP and the related (1-$\alpha$)$\%$ confidence interval bounds

References

Herron, M. (1999). Postestimation Uncertainty in Limited Dependent Variable Models. Political Analysis, 8, 83--98.

Examples

Run this code
fit<-runif(100)
y<-rbinom(100,1,0.5)
ePCP(fit,y,alpha=0.05)

Run the code above in your browser using DataLab