library(saePseudo)
data("dataVill")
<- avgPseudo(
result prov = dataVill$Area1,
reg = dataVill$Area2,
sub = dataVill$Area3,
vill = dataVill$Area4,
y = dataVill$ydir_area4,
x = dataVill$X1,
var = dataVill$vardir_area4,
N = dataVill$N,
method = "REML"
)
$Est_Area3
result#> # A tibble: 28 × 5
#> # Groups: Province, Region [6]
#> Province Region Subdistrict y_agr_villsub rse_agr_villsub
#> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1 1 1 28.9 0.826
#> 2 1 1 2 25.7 0.764
#> 3 1 1 3 28.0 0.654
#> 4 1 2 1 30.1 0.918
#> 5 1 2 2 31.0 0.872
#> 6 1 2 3 28.7 1.03
#> 7 1 2 4 28.1 1.63
#> 8 1 2 5 28.1 1.15
#> 9 1 2 6 28.8 0.925
#> 10 1 3 1 28.2 1.61
#> # ℹ 18 more rows
$Est_Area2
result#> # A tibble: 6 × 4
#> # Groups: Province [1]
#> Province Region y_agr_subreg rse_agr_subreg
#> <dbl> <dbl> <dbl> <dbl>
#> 1 1 1 27.5 0.426
#> 2 1 2 29.3 0.421
#> 3 1 3 28.9 0.295
#> 4 1 4 28.1 0.375
#> 5 1 5 28.6 0.450
#> 6 1 6 28.2 0.532
$Est_Area1
result#> # A tibble: 1 × 3
#> Province y_agr_regprov rse_agr_regprov
#> <dbl> <dbl> <dbl>
#> 1 1 28.5 0.165