calcSSQR: Calculate SSQ_R

View source: R/calculateSSQR.R

calcSSQRR Documentation

Calculate SSQ_R

Description

SSQ_R is the ratio of the within-network sum of squares to the total sum of squares. The adaptive cluster sampling (ACS) design becomes more efficient relative to simple random sampling (SRS) as the within-network variation increases relative to overall variation [@thompson1996adaptive]. We calculate

SSQ_R = SSQ_w/SSQ_tau

as the ratio of the within-network sum of squares

SSQ_w = ∑_{j=1}^{κ} ∑_{i \in j} (y_{j,i} - \bar{y_{j}})^2

, to the total sum of squares

SSQ_τ= ∑_{i=1}^{N} (y_i - μ)^2

. Thus, an increase in SSQ_R indicates an increase in the efficiency of the ACS design relative to SRS.

Usage

calcSSQR(popdata, variable, popvar = NULL)

Arguments

popdata

Information about the populations of interest. MORE DETAIL ABOUT STRUCTURE OF THIS.

variable

Variable for which to calculate SSQr.

popvar

A character string (OR VECTOR??) used to identify different populations. The default value is NULL.

Value

Dataframe including original data and RE estimates.

References

\insertRef

su2003estimatorACSampling

Examples

library(magrittr)
library(dplyr)
data(Thompson1990Fig1Pop)
temp <- Thompson1990Fig1Pop %>%
	mutate(pop = 1)
popdata <- temp
variable <- "y_value"
popvar <- "pop"
# calcSSQR(popdata, variable, popvar)
popvar <- NA
# calcSSQR(popdata, variable, popvar)

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