bayes_goal_func: 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
$$yn = Xn\beta + \epsilon,$$ $$\epsilon ~ N(0, \sigma^2 I_n),$$
where \(I_n\) is an \(n\) by \(n\) identity matrix.
When set to NULL, an appropriate Xn is automatically generated
bayesassurance::gen_Xn(). Note that setting Xn = NULL
also enables user to pass in a vector of sample sizes to undergo
evaluation as the function will automatically adjust Xn accordingly
based on the sample size.
K
The amount of utility associated with \(H0\) being correctly
accepted.The null hypothesis is not rejected if the posterior probability
of \(H0\) is at least \(1/(1+K)\).
pi
constant corresponding to the prior on parameter \(\beta\)
such that \(P(u'\beta_0) = 1 - P(u'\beta_1) = \pi\).
sigsq
variance constant of the linear regression model
u
fixed scalar or vector of the same dimension as \(\beta_0\) and
\(\beta_1\)
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