survsamp.ratio: 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 ratio wtih surveys using simple random sampling.

Usage

1
2
3
survsamp.ratio(x = NULL, y = NULL, B = NULL, N = NULL, mux = NULL,
  taux = NULL, sig2 = NULL, sample.size.det = FALSE, estimate = "ratio",
  alpha = 0.05)

Arguments

x

The independent data vector to be used for estimation.

y

The dependent data vector to be used for estimation.

B

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

N

The population size. Required for sample size determination.

mux

The population mean of x.

taux

The population total of x. This must be supplied if N is NULL.

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: ratio, mean, and total. This is only needed for sample size determination as all three are reported in estimation.

alpha

Significance level.

Examples

1
2
3
x=rnorm(50,5,1)
survsamp.ratio(x=x,y=x+rnorm(50),
estimate="ratio",mux=5,N=100)

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