survsamp.srs: A function for surveys using simple random sampling

Description Usage Arguments Examples

View source: R/survsamp.R

Description

This function allows you to make estimation or sample size determinations for surveys using simple random sampling.

Usage

1
2
3
survsamp.srs(y = NULL, B = NULL, N = NULL, p = NULL, sig2 = NULL,
  sample.size.det = FALSE, estimate = "mean", systematic = FALSE,
  alpha = 0.05)

Arguments

y

The data vector to be used for estimation.

B

The desired bound on the estimation. Required for sample size determination.

N

The population size. Required.

p

The population proportion.

sig2

The population variance.

sample.size.det

Logical statement indicating if the action should be sample size determination. If false, estimation occurs.

estimate

Indicate the desired statistic to be estimated. Options include: mean, total, and proportion.

systematic

Logical statement indicating if a systematic sample of a randomly ordered population is to occur. This results in a k value computed in the sample size determination.

alpha

Significance level.

Examples

1
2
3
4
5
survsamp.srs(B=.1,N=100,p=.75,
   sample.size.det = TRUE,estimate="proportion")
survsamp.srs(y=rnorm(50,5,2),N=100)#,sig2=1)
survsamp.srs(B=75,N=100,sig2=1,estimate="total",
   sample.size.det = TRUE,systematic=TRUE)

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