bayes_goal_func {bayesassurance} | R Documentation |
Decision Making using Rate of Correct Classification
Description
Determines the rate of correctly classifying the linear hypothesis as true or false, where the hypothesis test is specified as
H0: u'\beta = c0
vs.
H1: u'\beta = c1
. See vignette for more details.
Usage
bayes_goal_func(n, Xn = NULL, K, pi, sigsq, u, beta_0, beta_1)
Arguments
n |
sample size (vector or scalar). |
Xn |
design matrix that characterizing the data. This is specifically given by the normal linear regression model
where |
K |
The amount of utility associated with |
pi |
constant corresponding to the prior on parameter |
sigsq |
variance constant of the linear regression model |
u |
fixed scalar or vector of the same dimension as |
beta_0 |
fixed scalar or vector that null hypothesis is set to |
beta_1 |
fixed scalar or vector that alternative hypothesis is set to |
Value
a list of objects corresponding to the rate of classifications
rc_table: table of sample size and corresponding correct classification rates
rc_plot: plot of correct classification rates for varying sample sizes
Examples
## Example
n <- seq(100, 1200, 10)
out <- bayesassurance::bayes_goal_func(n, Xn = NULL, K = 1, pi = 0.5,
sigsq = 1, u = 1, beta_0 = 0.5, beta_1 = 0.6)
out$rc_plot