Compute aggregates of small area estimates and MSEs.

1 | ```
aggr(x, R)
``` |

`x` |
sae object. |

`R` |
aggregation matrix, r x M matrix where M is the number of areas and r the number of aggregate areas; default is aggregation over all areas. |

Object of class `sae`

with aggregated small area
estimates and MSEs.

`sae-class`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
d <- generateFakeData()
# compute small area estimates
sae <- fSAE(y0 ~ x + area2, data=d$sam, area="area", popdata=d$Xpop)
# by default aggregate over all areas
global <- aggr(sae)
EST(global); SE(global)
# aggregation to broad area
# first build aggregation matrix
M <- d$Xpop[, c("area22", "area23", "area24")] / d$Xpop[, "(Intercept)"]
M <- cbind(1 - rowSums(M), M); colnames(M)[1] <- "area21"
est.area2 <- aggr(sae, M)
EST(est.area2); SE(est.area2)
COV(est.area2) # covariance matrix
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.