summarizeNetworkInfo: Calculate the number of units per network and the unit...

View source: R/summarizeNetworkInformation.R

summarizeNetworkInfoR Documentation

Calculate the number of units per network and the unit inclusion probability for each network FOR A SINGLE POPULATION

Description

The purpose of this is to reduce computation time by calculating some necessary information before the data is bootstrapped. The function calculates (1) $pi_i$ (the unit inclusion probability) for each unit, given the size of its associated network and sample size (n1_vec) and (2) for each of the variables, the sum of the values of that variable for each network.

Usage

summarizeNetworkInfo(popdata, vars, popvar = NULL, n1_vec, yvar)

Arguments

popdata

population data.

vars

variables to summarise

popvar

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

n1_vec

Vector of initial sample size(s) for the initial simple random sample(s) without replacement; can be a single value or vector of values.

yvar

A string giving the name of the variable of interest, y, in the supplied dataframe popdata. This variable determines the condition under which adaptive cluster sampling takes place. In the dataframe $popdata$ this variable y must be numeric.

Value

The population data (one row per cell of each population), with additional columns indicating $pi_i$ for each network and (n1) and the number of units per network for each of the vars. WHERE the value of the var is greater than zero?

References

\insertRef

saubyadaptiveACSampling


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