n_locshift.Rd
Estimation as described by Chakraborti, Hong, & van de Wiel (2006).
n_locshift(s1, s2, delta, alpha = 0.05, power = 0.9, q = 0.5)
pilot samples
numeric value, location shift parameter \(\delta\)
type-I error probability
1 - type-II error probability, the desired statistical power
size of group0 relative to total sample size.
Returns an object of class "sample_size"
. It contains
the following components:
the total sample size
sample size in Group 0 (control group)
sample size in Group 1 (treatment group)
logical, TRUE
, if the estimated sample size
refers to a two-sided test
type I error rate used in sample size estimation
target power used in sample size estimation
effect size used in sample size estimation
short description of the type of effect size
additional comment, if there is any
the matched call.
WARNING: Note that the estimation has high variability due to its dependence on pilot samples. The smaller the pilot sample, the more uncertain is the estimation of the required sample size. In a simulation study, we found that the method may also be inaccurate on average, depending on the investigated data.
Chakraborti, S., Hong, B., & van de Wiel, M. A. (2006). A note on sample size determination for a nonparametric test of location. Technometrics, 48(1), 88–94. https://doi.org/10.1198/004017005000000193
n_locshift(s1 = rexp(10), s2 = rexp(10),
alpha = 0.05, power = 0.9, delta = 0.35)
#> Estimated sample size for group difference.
#> Wilcoxon-Mann-Whitney Test, Location shift
#>
#> N (total) 133.79
#> n0 (Group 0) 66.9
#> n1 (Group 1) 66.9
#>
#> Effect size 0.35
#> Effect type location shift
#> Type I error 0.05
#> Target power 0.9
#> Two-sided FALSE
#>
#> Call: n_locshift(s1 = rexp(10), s2 = rexp(10), delta = 0.35, alpha = 0.05,
#> power = 0.9)