Generates two normal independent samples with desired power and cohen's effect.
Usage
sample2indp.pow(n1, mean = 0, s1= 1, d.cohen, power,
alternative = c("two.sided", "less", "greater"), delta = 1,
conf.level = 0.95, dec = 2)
Value
A list containing the following components:
Data: a data frame containing the samples created.
Size: size of each sample.
T.test: a t-test of the samples.
Arguments
n1
first sample size.
mean
vector of sample means.
s1
standard deviation for first sample.
d.cohen
Cohen's effect.
power
power of the test.
alternative
a character string specifying the alternative hypothesis for T-Test. Must be one of ``two.sided`` (default), ``greater`` or ``less``. Can be specified just the initial letter.
delta
true value of the difference in means.
conf.level
confidence level of the interval.
dec
number of decimals for observations.
Details
Pooled standard deviation= sp = sqrt((n1 - 1) sigma1^2 +(n2 - 1) sigma2^2) / (n1 + n2 - 2)