ggs_pcp: Plot for model fit of binary response variables: percent...

Description Usage Arguments Value Examples

View source: R/ggs_pcp.R

Description

Plot a histogram with the distribution of correctly predicted cases in a model against a binary response variable.

Usage

1
ggs_pcp(D, outcome, threshold = "observed", bins = 30)

Arguments

D

Data frame whith the simulations. Notice that only the fitted / expected posterior outcomes are needed, and so either the previous call to ggs() should have limited the family of parameters to only pass the fitted / expected values. See the example below.

outcome

vector (or matrix or array) containing the observed outcome variable. Currently only a vector is supported.

threshold

numerical bounded between 0 and 1 or "observed", the default. If "observed", the threshold of expected values to be considered a realization of the event (1, succes) is computed using the observed value in the data. Otherwise, a numerical value showing which threshold to use (typically, 0.5) can be given.

bins

integer indicating the total number of bins in which to divide the histogram. Defaults to 30, which is the same as geom_histogram()

Value

A ggplot object

Examples

1
2

ggmcmc documentation built on Feb. 10, 2021, 5:10 p.m.