optimal_g | R Documentation |
1-\alpha
confidence interval
at sample size n is minimizedComputes the value of g such that width of the 1-\alpha
confidence interval
at sample size n is minimized
optimal_g(n, number_of_coefficients, alpha)
n |
A positive sample size integer. |
number_of_coefficients |
A positive integer of coefficients in the full model |
alpha |
A positive numeric scalar in (0,1) for nominal Type I error. |
A positive numeric scalar representing the optimal g
that minimizes the CI width.
n <- 10000
alpha <- 0.05
g_star <- optimal_g(n, 5, alpha)
cat("The optimal g is:", g_star, "\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.