demo/design.R

library("maSAE")
message("## load data")
data("s2")
message("## create object")
saeO <- saObj(data = s2, f = y ~ NULL | g)
message("## design-based estimation for all small areas given by g")
predict(saeO)
message("## again, assuming the data are clustered:")
saeO <- saObj(data = s2, f = y ~ NULL | g, cluster = "clustid")
message("## as expected, the variances disregarding the clusters were deflated:")
predict(saeO)

Try the maSAE package in your browser

Any scripts or data that you put into this service are public.

maSAE documentation built on April 12, 2021, 5:06 p.m.