HT {Frames2}R Documentation

Horvitz - Thompson estimator

Description

Computes the Horvitz - Thompson estimator

Usage

HT(y, pik)

Arguments

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 y

Details

Horvitz - Thompson estimator of population total is given by

\hat{Y}_{HT} = \sum_{k \in s} \frac{y_k}{\pi_k}

Value

A numeric value representing Horvitz - Thompson estimator for population total for considered values

References

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

See Also

VarHT

Examples

##########   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)

[Package Frames2 version 0.2.1 Index]