predict.ecap: Implementing the ECAP procedure

Description Usage Arguments Value Author(s) References Examples

View source: R/ecap.R

Description

Takes in an ECAP object and a new set of probability estimates that the user wishes to adjust. The model uses the calibration from the ecap object to ECAP adjust the new probability estimates given to the function predict.

Usage

1
2
## S3 method for class 'ecap'
predict(object, new_unadjusted, ...)

Arguments

object

An object of class ecap.

new_unadjusted

A numerical vector of unadjusted probabilities that you want to ECAP adjust.

...

Additional arguments

Value

A vector of ECAP adjusted probability estimates.

Author(s)

Bradley Rava, Peter Radchenko and Gareth M. James.

References

http://faculty.marshall.usc.edu/gareth-james/Research/Probs.pdf

Examples

1
2
3
4
5
6
7
set.seed(1)
p_obs <- runif(1000, 0, 1)
win_var <- rbinom(length(p_obs), 1, p_obs)
ecap_fit <- ecap(unadjusted_prob = p_obs, win_var = win_var, win_id = 1, bias_indicator = FALSE)

p_new <- runif(1000, 0, 1)
ecap_new <- predict(object=ecap_fit, new_unadjusted=p_new)

ecap documentation built on July 23, 2020, 9:07 a.m.