Learn R Programming

hbsae (version 1.0)

bench: Benchmark small area estimates.

Description

Benchmark small area estimates to agree with given totals at aggregate levels.

Usage

bench(x, R, rhs, mseMethod = "no")

Arguments

x

sae object to be benchmarked.

R

restriction matrix, r x M matrix where r is the number of restrictions and M the number of areas; default is a single constraint on the population total. Note that R acts on the vector of area population totals, not the vector of means.

rhs

r-vector of benchmark totals corresponding to the restrictions in the rows of R.

mseMethod

if "no", MSEs are not updated, if "exact", constraints are treated as exact identities, and if "model", the squared differences between original and benchmarked estimates are added to the MSEs.

Value

An object of class sae with adjusted estimates.

References

Y. You, J.N.K. Rao and P. Dick (2004). Benchmarking Hierarchical Bayes Small Area Estimators in the Canadian Census Undercoverage Estimation. Statistics in Transition 6(5), 631-640.

See Also

sae-class

Examples

Run this code
# NOT RUN {
d <- generateFakeData()

# compute small area estimates
sae <- fSAE(y0 ~ x + area2, data=d$sam, area="area", popdata=d$Xpop)

# calibrate to overall population total
sae.c <- bench(sae, rhs=sum(d$mY0*sae$Narea))
plot(sae, sae.c)
# }

Run the code above in your browser using DataLab