n.means {samplesizeestimator}R Documentation

Sample Size for Comparing Independent and dependent means

Description

This function computes the sample size based on three different methods i) comparing mean with a specified value ii) comparing two independent means iii) comparing two dependent means

Usage

n.means(
  delta,
  sd,
  alp = 0.05,
  pwr = 0.8,
  type = "two",
  alternative = "two.sided",
  k = 1,
  paired = FALSE
)

Arguments

delta

anticipated difference between the two groups

sd

anticipated standard deviation

alp

anticipated level of significance or accepted level of type I error alp=0.05 is default

pwr

desired power pwr=0.80 is default

type

string specifying the type of sample (one or two) type=two is default

alternative

one or two sided alternative hypothesis "two.sided" is default

k

the ratio of control to experimental patients k=1 is default

paired

a logical argument indicating whether the sample is independent or dependent FALSE is default

Value

a list object, the required minimum sample size along with description for reporting

Author(s)

R. Amala, Scientist-C, ICMR-VCRC, Puducherry & G. Kumarapandiyan, Asst. Prof., Madras Christian College, Chennai

References

Lwanga, S. K., Lemeshow, S., & World Health Organization. (1991). Sample size determination in health studies: a practical manual. World Health Organization.

Examples

n.means(delta = 1.5, sd = 1, alp = 0.05, pwr = 0.9, type ="two",
alternative= "two.sided", k = 1, paired = FALSE)

[Package samplesizeestimator version 1.0.0 Index]