predict-methods: Methods for Function 'predict'

Description Usage Arguments Details Value Methods See Also Examples

Description

Calculate small area predictions and their variances.

Usage

1
2
3
4
5
6
7
predict(object, ...)

## S4 method for signature 'sadObj'
predict(object)

## S4 method for signature 'saeObj'
predict(object, version = NULL, use_lm = NA)

Arguments

object

a model object for which prediction is desired.

...

Arguments to be passed to methods.

version

set to "1.0.0" or set options(maSAE_version = "1.0.0") to use the functions from maSAE 1.0.0. See NEWS.md for 2.0.0.

use_lm

Rather for internal use, stick with the default.

Details

Based on the structure of the saeObj given, predict decides, which predictor to use:
If a smallAreaMeans-data.frame covering all fixed effects is given, the exhaustive estimator \hat{\tilde{y}}_{g, synth} is calculated.
If a smallAreaMeans-data.frame not covering all fixed effects is given, the partially exhaustive estimator \hat{\tilde{y}}_{g, greg} is calculated.
If no smallAreaMeans-data.frame but s1 is given, the three-phase estimator \hat{\tilde{y}}_{g, g3reg} is calculated.
If neither smallAreaMeans nor s1 are given, the non-exhaustive estimator \hat{\tilde{y}}_{g, psynth} is calculated.
If a clustering variable is given, the cluster sampling design equivalents of the above estimators are used.
If version is not set to "1.0.0", the (pseudo) small and synthetic estimations and their variances are also calculated (see vignette("A_Taxonomy_of_Estimators", package = "maSAE"))

Value

A data frame containing predictions and variances for each small area, see Details above.

Methods

signature(object = saeObj)

Calculate predictions and variances according to the auxiliary information given, see Details above.

signature(object = sadObj)

Calculate design-based predictions and variances.

See Also

vignette(package = "maSAE")

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## ## design-based estimation
## load data
data("s2", package = "maSAE")
## create object
saeO <- maSAE::saObj(data = s2, f = y ~ NULL | g)
## design-based estimation for all small areas given by g
maSAE::predict(saeO)
## ## model-assisted estimation
## load  data
data("s1", "s2", package = "maSAE")
str(s1)
s12 <- maSAE::bind_data(s1, s2)
## create object
saeO <- maSAE::saObj(data = s12, f = y ~ x1 + x2 + x3 | g, s2 = "phase2")
## small area estimation
maSAE::predict(saeO)

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