sae.al.f {JoSAE} | R Documentation |
Area-level small area estimation under heteroscedasticity or homoscedasticity.
Description
Area-level small area estimation, possibly under heteroscedasticity. Assumes SRS within domains.
Usage
sae.al.f(domain.id, n.i, psi.i, formula, data, b.i, type = "RE", verbose
= F, iter = 100, a.conv = 0.001,...)
Arguments
domain.id |
Vector of unique domain IDs corresponding to data. |
n.i |
Vector of number of samples within each domain i, corresponding to data. |
psi.i |
Vector of variances of the direct estimator within each domain i, corresponding to data. |
formula |
Formula for fixed effects. |
data |
Domain-level data. |
b.i |
Parameter for modeling heteroscedasticity. |
type |
Method for estimating variance parameters. Currently, only option is "RE" for REML. |
verbose |
Boolean. Should more info be printed? |
iter |
Max number of iterations. Default is 100. |
a.conv |
Threshold for accepting convergency. Default is 0.001 |
... |
Parameters forwarded to other functions. |
Details
SRS (simple random sampling) is assumed within each domain. If the direct estimator is not based on SRS, RV components of the results do not make sense.
Value
results |
Area-level estimates and associated standard errors
(SE). |
beta.hat |
Estimated fixed-effects parameters. |
des.mat |
Design matrix. |
Other list elements have descriptive names.
Author(s)
Johannes Breidenbach
References
Breidenbach et al. (2018) Unit-level and area-level small area estimation under heteroscedasticity using digital aerial photogrammetry data. Remote Sensing of Environment.
Examples
library(nlme)
#sample data
data(ulal.sub.samp.dat)
#domain means of x
data(ulal.sub.dom.dat)
#The easiest way of getting the data into the right format
#is to fit a unit-level model first.
res <-
sae.ul.f(samp.data=ulal.sub.samp.dat,
population.data=ulal.sub.dom.dat,
k.ij=ulal.sub.samp.dat[,"k.ij.one"],
formula=w.VMPRHA ~ elev.mean + elev.mean.sq,
domain.col="stand.ID",
sample.id.col="plot.ID",
neg.sfrac=TRUE)
#data for AL
dat.al <- merge(res$data$samp.agg.X.pop[,c("domain.id","n.i","w.VMPRHA.ybar.i","elev.mean.X.pop")],
res$est$se[,c("domain.id","se.srs")])
#area-level SAE under homoscedasticity
res <- sae.al.f(
domain.id=dat.al$domain.id , n.i=dat.al$n.i , psi.i=dat.al$se.srs^2
, formula=w.VMPRHA.ybar.i ~ elev.mean.X.pop , data=dat.al
, b.i=rep(1, nrow(dat.al))
, type="RE")
#area-level SAE heteroskedasticity
bi.par <- 0.39#select b.i parameter
#helper function
range01 <- function(x, ...){(x - min(x, ...)) /
(max(x, ...) - min(x, ...))}
res <- sae.al.f(
domain.id=dat.al$domain.id , n.i=dat.al$n.i , psi.i=dat.al$se.srs^2
, formula=w.VMPRHA.ybar.i ~ elev.mean.X.pop, data=dat.al
, b.i=range01(dat.al$elev.mean.X.pop)+bi.par
, type="RE")