View source: R/bayes_goal_func.R
bayes_goal_func | R Documentation |
Determines the rate of correctly classifying the linear hypothesis as true or false, where the hypothesis test is specified as
H0: u'β = c0
vs.
H1: u'β = c1
. See vignette for more details.
bayes_goal_func(n, Xn = NULL, K, pi, sigsq, u, beta_0, beta_1)
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β + ε, ε ~ N(0, σ^2 I_n), where I_n is an n by n identity matrix.
When set to |
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 β such that P(u'β_0) = 1 - P(u'β_1) = π. |
sigsq |
variance constant of the linear regression model |
u |
fixed scalar or vector of the same dimension as β_0 and β_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 |
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
## 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.