# E.piPS: Estimation of the Population Total under Probability... In TeachingSampling: Selection of Samples and Parameter Estimation in Finite Population

## Description

Computes the Horvitz-Thompson estimator of the population total according to a πPS sampling design

## Usage

 `1` ```E.piPS(y, Pik) ```

## Arguments

 `y` Vector, matrix or data frame containing the recollected information of the variables of interest for every unit in the selected sample `Pik` Vector of inclusion probabilities for each unit in the selected sample

## Details

Returns the estimation of the population total of every single variable of interest, its estimated variance and its estimated coefficient of variation under a πPPS sampling design. This function uses the results of approximate expressions for the estimated variance of the Horvitz-Thompson estimator

## Value

The function returns a data matrix whose columns correspond to the estimated parameters of the variables of interest

## Author(s)

Hugo Andres Gutierrez Rojas hagutierrezro@gmail.com

## References

Matei, A. and Tille, Y. (2005), Evaluation of Variance Approximations and Estimators in Maximun Entropy Sampling with Unequal Probability and Fixed Sample Design. Journal of Official Statistics. Vol 21, 4, 543-570.
Sarndal, C-E. and Swensson, B. and Wretman, J. (1992), Model Assisted Survey Sampling. Springer.
Gutierrez, H. A. (2009), Estrategias de muestreo: Diseno de encuestas y estimacion de parametros. Editorial Universidad Santo Tomas.

`S.piPS`
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21``` ```# Uses the Lucy data to draw a sample according to a piPS # without replacement design data(Lucy) attach(Lucy) # The inclusion probability of each unit is proportional to the variable Income # The selected sample of size n=400 n <- 400 res <- S.piPS(n, Income) sam <- res[,1] # The information about the units in the sample is stored in an object called data data <- Lucy[sam,] attach(data) names(data) # Pik.s is the inclusion probability of every single unit in the selected sample Pik.s <- res[,2] # The variables of interest are: Income, Employees and Taxes # This information is stored in a data frame called estima estima <- data.frame(Income, Employees, Taxes) E.piPS(estima,Pik.s) # Same results than HT function HT(estima, Pik.s) ```