Description Usage Arguments Details Value References See Also Examples
Computes the Horvitz - Thompson estimator
1 | HT(y, pik)
|
y |
A numeric vector of size n containing information about variable of interest |
pik |
A numeric vector of size n containing first order inclusion probabilities for units included in |
Horvitz - Thompson estimator of population total is given by
\hat{Y}_{HT} = ∑_{k \in s} \frac{y_k}{π_k}
A numeric value representing Horvitz - Thompson estimator for population total for considered values
Horvitz, D. G. and Thompson, D. J. (1952) A generalization of sampling without replacement from a finite universe. Journal of the American Statistical Association, 47, 663 - 685
1 2 3 4 5 6 7 8 9 10 11 12 | ########## Example 1 ##########
U <- c(13, 18, 20, 14, 9)
#A simple random sample of size 2 without replacement is drawn from population
s <- sample(U, 2)
ps <- c(0.4, 0.4)
HT(s, ps)
########## Example 2 ##########
data(DatA)
attach(DatA)
#Let estimate population total for variable Feeding in frame A
HT(Feed, ProbA)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.