powered by
Simulated tax refund data frame including the estimated and actual refund value
data(tax)
A data frame with 9083 observations on the following 5 variables.
id
a numeric vector indicating the tax payer
estRefund
a numeric vector representing the estimated value of tax refund by the tax payer
actRefund
a numeric vector representing the actual tax refund calculated by the financial authority
diff
difference between estimated and acture tax refund
Class
a factor with levels 1, 2, 3, and 4 indicating the strata
1
2
3
4
Kauermann, Goeran/Kuechenhoff, Helmut (2010): Stichproben. Methoden und praktische Umsetzung mit R. Springer.
# NOT RUN { data(tax) summary(tax) # illustration of stratamean nh <- as.vector(table(tax$Class)) wh <- nh/sum(nh) stratamean(y=tax$diff, h=as.vector(tax$Class), wh=wh, eae=TRUE) # }
Run the code above in your browser using DataLab