Description Usage Format Details References Examples
Data provides guesses and true values for students wallet money.
1 |
A data frame with 13 observations (corresponding to the students) on the following 3 variables.
ida numeric vector of identification number
Xa numeric vector of secondary information, guesses of money in the wallet
ya 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.
1 2 3 4 5 6 7 8 9 |
Loading required package: pps
Loading required package: sampling
Loading required package: survey
Loading required package: grid
Loading required package: Matrix
Loading required package: survival
Attaching package: ‘survival’
The following objects are masked from ‘package:sampling’:
cluster, strata
Attaching package: ‘survey’
The following object is masked from ‘package:graphics’:
dotchart
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
mbes object: Model Based Estimation of Population Mean
Population size N = 13, sample size n = 7
Values for auxiliary variable:
X.mean.1 = 27.8462, x.mean.1 = 24.8571
----------------------------------------------------------------
Simple Estimate
Mean estimate: 33.0771
Standard error: 4.0872
95% confidence interval [25.0663,41.088]
----------------------------------------------------------------
Difference Estimate
Mean estimate: 36.0662
Standard error: 2.1998
95% confidence interval [31.7546,40.3778]
----------------------------------------------------------------
Ratio Estimate
Mean estimate: 37.0546
Standard error: 1.8764
95% confidence interval [33.3768,40.7323]
----------------------------------------------------------------
Linear Regression Estimate
Mean estimate: 37.5665
Standard error: 2.0042
95% confidence interval [33.6383,41.4946]
----------------------------------------------------------------
Linear Regression Model:
Call:
lm(formula = formula, data = data)
Residuals:
1 2 3 4 5 6 7
4.239 -8.640 -5.012 -2.811 12.809 2.423 -3.008
attr(,"na.action")
[1] 2 4 8 11 12 13
attr(,"class")
[1] "omit"
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -4.2571 8.8633 -0.480 0.6513
x 1.5020 0.3362 4.467 0.0066 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 7.805 on 5 degrees of freedom
Multiple R-squared: 0.7996, Adjusted R-squared: 0.7596
F-statistic: 19.95 on 1 and 5 DF, p-value: 0.006598
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.