Description Usage Arguments Details Value References Examples
View source: R/ssp_chakraborti.R
Based on the procedure described by Chakraborti, Hong, & van de Wiel (2006)
1 2 3 4 5 6 7 8 9 10 | n_locshift_bound(
s1,
s2,
delta,
alpha = 0.05,
power = 0.9,
quantile = 0.9,
n_resamples = 500,
q = 0.5
)
|
s1, s2 |
Pilot samples |
delta |
numeric value, location shift parameter δ |
alpha |
Type I error probability |
power |
1 - Type II error probability, the desired statistical power |
quantile |
Quantile to use as the upper bound. |
n_resamples |
number of resamples to use in bootstrapping |
q |
size of group0 relative to total sample size. |
WARNING: Note that the underlying 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 underlying method may also be inaccurate on average, depending on the investigated data.
Returns an object of class "sample_size"
. It contains
the following components:
n |
the total sample size |
n0 |
sample size in Group 0 (control group) |
n1 |
sample size in Group 1 (treatment group) |
two_sided |
logical, |
alpha |
type I error rate used in sample size estimation |
power |
target power used in sample size estimation |
effect |
effect size used in sample size estimation |
effect_type |
short description of the type of effect size |
comment |
additional comment, if there is any |
call |
the matched call. |
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
1 2 3 4 | ## Not run:
n_locshift_bound(s1 = rexp(10), s2 = rexp(10),
delta = 0.35, alpha = 0.05, power = 0.9, n_resamples = 5)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.