pi_i | R Documentation |
Calculate the inclusion probabilities of units in a simple random sample without replacement.
pi_i(N, n1, m_vec)
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 |
vector of inclusion probabilities
# 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.