Learn R Programming

radiant (version 0.1.95)

sample_size: Sample size calculation

Description

Sample size calculation

Usage

sample_size(ss_type = "mean", ss_mean_err = 2, ss_mean_s = 10, ss_prop_err = 0.1, ss_prop_p = 0.5, ss_z = 1.96, ss_incidence = 1, ss_response = 1, ss_pop_correction = "no", ss_pop_size = 1000000)

Arguments

ss_type
Choose "mean" or "proportion"
ss_mean_err
Acceptable Error for Mean
ss_mean_s
Standard deviation for Mean
ss_prop_err
Acceptable Error for Proportion
ss_prop_p
Initial proportion estimate for Proportion
ss_z
Z-value
ss_incidence
Incidence rate (i.e., fraction of valid respondents)
ss_response
Response rate
ss_pop_correction
Apply correction for population size ("yes","no")
ss_pop_size
Population size

Value

A list of variables defined in sample_size as an object of class sample_size

Details

See http://vnijs.github.io/radiant/quant/sample_size.html for an example in Radiant

See Also

summary.sample_size to summarize results

Examples

Run this code
result <- sample_size(ss_type = "mean", ss_mean_err = 2, ss_mean_s = 10)

Run the code above in your browser using DataLab