survsamp.diff: A function for surveys using simple random sampling when...

Description Usage Arguments Examples

View source: R/survsamp.R

Description

This function allows you to make estimation or sample size determinations for the difference between two groups with surveys using simple random sampling.

Usage

1
2
3
survsamp.diff(y1 = NULL, y2 = NULL, N1 = NULL, N2 = NULL,
  sig2.1 = NULL, sig2.2 = NULL, p1 = NULL, p2 = NULL,
  estimate = "mean", alpha = 0.05, prop.dpnt = FALSE)

Arguments

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.

Examples

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)

carrollrm/survsamp documentation built on April 28, 2020, 4:04 a.m.