money.Rd
Data provides guesses and true values for students wallet money.
data(money)
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.
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.
Kauermann, Goeran/Kuechenhoff, Helmut (2010): Stichproben. Methoden und praktische Umsetzung mit R. Springer.
#> id X y #> 1 1 30 45.04 #> 2 2 18 NA #> 3 3 29 30.66 #> 4 4 100 NA #> 5 5 25 28.28 #> 6 6 35 45.50 #> 7 7 30 53.61 #> 8 8 9 NA #> 9 9 7 8.68 #> 10 10 18 19.77 #> 11 11 40 NA #> 12 12 15 NA #> 13 13 6 NA# 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')#> Error in mbes(y ~ x, aux = mu.X, N = 13, method = "all"): Wrong input: Missing data or wrong input of data