se2n {BayesRepDesign} | R Documentation |
This function computes the sample size related to a specified
standard error \sigma
and unit standard deviation
unitSD
, which is the standard deviation of one effective unit (one
measurement, one pair of measurements, one event, etc.). The relationship
\sigma = \code{unitSD}/\sqrt{n}
is
assumed. The unit standard deviation depends on the parameter type and
the assumptions underlying the standard error calculation. The default is
unitSD = 2
which is, under some assumptions, a reasonable
approximation to the unit standard deviation for standardized mean
differences and log odds/hazard/rate ratios, see Section 2.4 in
Spiegelhalter et al. (2004).
se2n(se, unitSD = 2)
se |
Standard error |
unitSD |
Unit standard deviation. Defaults to |
The sample size corresponding to the specified standard error and unit standard deviation
Samuel Pawel
Pawel, S., Consonni, G., and Held, L. (2022). Bayesian approaches to designing replication studies. arXiv preprint. doi:10.48550/arXiv.2211.02552
Spiegelhalter, D.J., Abrams, K.R., Myles, J.P. (2004). Bayesian approaches to clinical trials and health care evaluation. Wiley. doi:10.1002/0470092602
smd1 <- 0.3
so1 <- 0.05
dprior <- designPrior(to = smd1, so = so1)
ssd1 <- ssdSig(level = 0.025, dprior = dprior, power = 0.8)
se2n(se = ssd1$sr, unitSD = 2) # required n