Learn R Programming

samplingbook (version 1.2.4)

money: Money Data Frame

Description

Data provides guesses and true values for students wallet money.

Usage

data(money)

Arguments

Format

A data frame with 13 observations (corresponding to the students) on the following 3 variables.

id

a numeric vector of identification number

X

a numeric vector of secondary information, guesses of money in the wallet

y

a numeric vector of primary information, counted money in the wallet. NA means subject was not included into the sample.

Details

In a lesson an experiment was made, in which the students were asked to guess the current amount of money in their wallet. A simple sample of these students was drawn, who counted the money in their wallet exactly. Using this secondary information, model based estimation of the population mean is possible.

References

Kauermann, Goeran/Kuechenhoff, Helmut (2010): Stichproben. Methoden und praktische Umsetzung mit R. Springer.

Examples

Run this code
# NOT RUN {
data(money)
print(money)

# Usage of mbes()
mu.X <-  mean(money$X)
x <- money$X[which(!is.na(money$y))]
y <- na.omit(money$y)
# estimation
mbes(y~x, aux=mu.X, N=13, method='all')
# }

Run the code above in your browser using DataLab