pi_i: Calculate the inclusion probabilities of units in a simple...

View source: R/pi_i.R

pi_iR Documentation

Calculate the inclusion probabilities of units in a simple random sample without replacement.

Description

Calculate the inclusion probabilities of units in a simple random sample without replacement.

Usage

pi_i(N, n1, m_vec)

Arguments

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.

Value

vector of inclusion probabilities

Examples

# example from section 4, p. 1055 (first column) in Thompson (1990)
N = 5
n1 = 2
y = c(1,10,1000)
m_vec = c(1,2,2)
pi_i(N, n1, m_vec)
# EXAMPLE 4:
# Ch. 24, Exercise #2, p. 307, from Thompson (2002)
N=1000
n1=100
m_vec=c(2,3,rep(1,98))
head(pi_i(N, n1, m_vec))

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