OptSig (version 1.0)

Opt.sig.t2n.test: Optimal significance level calculation for two samples (different sizes) t-tests of means

Description

Computes the optimal significance level for two samples (different sizes) t-tests of means

Usage

Opt.sig.t2n.test(d=NULL,n1=NULL,n2=NULL,p=0.5,k=1,alternative="two.sided")

Arguments

d

Effect size

n1

umber of observations in the first sample

n2

umber of observations in the second 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"

Value

alpha.opt

Optimal level of significance

beta.opt

Type II error probability at the optimal level

Details

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

References

Kim and Choi, 2017, Choosing the Level of Significance: A Decision-theoretic Approach: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2652773

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 and Choi, 2017, Choosing the Level of Significance: A Decision-theoretic Approach

Examples

Run this code
# NOT RUN {
Opt.sig.t2n.test(d=0.6,n1=90,n2=60,alternative="greater")
# }

Run the code above in your browser using DataLab