E.BE: Estimation of the Population Total under Bernoulli Sampling...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/E.BE.r

Description

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

Usage

1
E.BE(y, prob)

Arguments

y

Vector, matrix or data frame containing the recollected information of the variables of interest for every unit in the selected sample

prob

Inclusion probability for each unit in the population

Details

Returns the estimation of the population total of every single variable of interest, its estimated standard error and its estimated coefficient of variation under an BE sampling design

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

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.

See Also

S.BE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Uses the Lucy data to draw a Bernoulli sample
data(Lucy)
attach(Lucy)

N <- dim(Lucy)[1]
n=400
prob=n/N
sam <- S.BE(N,prob)
# The information about the units in the sample is stored in an object called data
data <- Lucy[sam,]
attach(data)
names(data)
# 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.BE(estima,prob)

Example output

The following objects are masked from Lucy:

    Employees, ID, Income, Level, SPAM, Taxes, Ubication, Zone

[1] "ID"        "Ubication" "Level"     "Zone"      "Income"    "Employees"
[7] "Taxes"     "SPAM"     
                         N       Income    Employees        Taxes
Estimation     2611.640000 1.140778e+06 1.658032e+05 33762.635000
Standard Error  114.158152 6.011109e+04 8.181227e+03  2963.436852
CVE               4.371129 5.269309e+00 4.934300e+00     8.777268
DEFF                   Inf 3.199263e+00 4.635292e+00     1.326754

TeachingSampling documentation built on April 22, 2020, 1:05 a.m.