fitfh: Fit Fay-Herriot Model

Description Usage Arguments Details Examples

View source: R/fitfh.R

Description

Fit Fay-Herriot Model

Usage

1
2
fitfh(formula, vardir, idName, data, optsRobust = genOptsRobust(),
  optsOptim = genOptsOptim(), type = "RFH", y = TRUE)

Arguments

formula

for fixed effects

vardir

variable name as character of known sampling variances

idName

variable name as character of the domain ID

data

area-level data as data.frame

optsRobust

a list containing parameters for robust estimation. See genOptsRobust for available options

optsOptim

a list containing parameters controlling the algorithm. See genOptsOptim for available options

type

The type of model, see details

y

logical, TRUE if the vector of direct estimates (response) is part of the return value. Necessary for (postestimation) computing residuals etc.

Details

The type controls the model to be estimated. At this time only the robust Fay-Herriot model ('RFH') is supported.

Examples

1
2
3
data(milk)
milk$SD <- milk$SD^2
fit <- fitfh(formula = yi ~ as.factor(MajorArea), vardir="SD", idName="SmallArea", data = milk)

wahani/SAE documentation built on May 3, 2019, 7:37 p.m.

Related to fitfh in wahani/SAE...