Learn R Programming

ecap (version 0.1.2)

plot.ecap: Plotting ECAP Object

Description

Plots diagnostic information of an ECAP object. Two plots are produced. The first plot displays the estimate of the function g that the ecap procedure produced. The second compares the unadjusted probability estimates to the ECAP adjusted probability estimates that were used to train the model.

Usage

# S3 method for ecap
plot(x, ...)

Arguments

x

An object of class ecap.

...

Additional arguments

References

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

Examples

Run this code
# NOT RUN {
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)
plot(ecap_fit)
# }

Run the code above in your browser using DataLab