OptSig.p: Optimal significance level calculation for proportion tests...

View source: R/OptSig.p.R

OptSig.pR Documentation

Optimal significance level calculation for proportion tests (one sample)

Description

Computes the optimal significance level for proportion tests (one sample)

Usage

OptSig.p(ncp=NULL,h=NULL,n=NULL,p=0.5,k=1,alternative="two.sided",Figure=TRUE)

Arguments

ncp

Non-centraity parameter

h

Effect size, Cohen's h

n

Number of observations (per sample)

p

prior probability for H0, default is p = 0.5

k

relative loss from Type I and II errors, k = L2/L1, default is k = 1

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less"

Figure

show graph if TRUE (default); No graph if FALSE

Details

Refer to Kim and Choi (2020) for the details of k and p

Either ncp or h value should be given

For h, refer to Cohen (1988) or Chapmely (2017)

In a general term, if X ~ N(mu,sigma^2); let H0:mu = mu0; and H1:mu = mu1;

ncp = sqrt(n)(mu1-mu0)/sigma

Value

alpha.opt

Optimal level of significance

beta.opt

Type II error probability at the optimal level

Note

Also refer to the manual for the pwr package

The black curve in the figure is the line of enlightened judgement: see Kim and Choi (2020). The red dot inticates the optimal significance level that minimizes the expected loss: (alpha.opt,beta.opt). The blue horizontal line indicates the case of alpha = 0.05 as a reference point.

Author(s)

Jae H. Kim (using a function from the pwr package)

References

Kim and Choi, 2020, Choosing the Level of Significance: A Decision-theoretic Approach: Abacus: a Journal of Accounting, Finance and Business Studies. Wiley. <https://doi.org/10.1111/abac.12172>

Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Hillsdale,NJ: Lawrence Erlbaum.

Stephane Champely (2017). pwr: Basic Functions for Power Analysis. R package version 1.2-1. https://CRAN.R-project.org/package=pwr

See Also

Kim, Jae H., 2020, Decision-theoretic hypothesis testing: A primer with R package OptSig, The American Statistician. <https://doi.org/10.1080/00031305.2020.1750484.>

Examples

OptSig.p(h=0.2,n=60,alternative="two.sided")

OptSig documentation built on July 3, 2022, 5:05 p.m.

Related to OptSig.p in OptSig...