Description Usage Arguments Examples
This function allows you to make estimation or sample size determinations for the difference between two groups with surveys using simple random sampling.
1 2 3 |
y1 |
The data vector from population 1 to be used for estimation. |
y2 |
The data vector from population 2 to be used for estimation. |
N1 |
The population size for population 1. Required. |
N2 |
The population size for population 2. Required. |
sig2.1 |
The population 1 variance. |
sig2.2 |
The population 2 variance. |
p1 |
The population 1 proportion. |
p2 |
The population 2 proportion. |
estimate |
Indicate the desired statistic to be estimated. Options include: mean, total, and proportion. |
alpha |
Significance level. |
prop.dpnt |
Logical statement indicating if the two proportions are dependent. |
1 2 3 4 5 6 | survsamp.diff(y1=rnorm(25,5,1),y2=rnorm(25,10,2),
N1=46,N2=54,sig2.1=1,sig2.2=2,
estimate="mean")
survsamp.diff(y1=rbinom(25,1,.75),y2=rbinom(25,1,.5),
N1=46,N2=54,
estimate="proportion",prop.dpnt=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.