var_R_hat: Calculate the variance of R hat

View source: R/var_R_hat_C.R View source: R/drafts/var_R_hat.R

var_R_hatR Documentation

Calculate the variance of R hat

Description

Calculate the variance of R hat

# Example from Thompson (2002), p. 78-79 N = 100 n1 = 4 x = c(60, 60, 14, 1) y = c(1, 1, 1, 1) m = c(5, 5, 2, 1) R_hat(y, x, N, n1, m, replace="TRUE") var_R_hat(y, x, N, n1, m)

Usage

var_R_hat(y, x, N, n1, m_vec, replace = "FALSE")

Arguments

y

The variable of interest, y. Must be a numeric vector. The criterion that determines whether adaptive cluster sampling takes place is based on this variable.

x

A vector of values for variable $x$, which is auxiliary data about the variable of interest $y$.

N

Population size.

n1

An integer giving the initial sample size (e.g., a simple random sample).

m_vec

Vector of values m for the set of units in a sample, of length n1. Each m value within the vector m_vec denotes the number of units satisfying the ACS criterion for the network i to which the unit belongs.

replace

Whether sampling should be done with or without replacement. Defaults to FALSE.


ksauby/ACS documentation built on Aug. 18, 2022, 3:33 a.m.