saeFH.ns.uprop {sae.prop}R Documentation

EBLUPs based on a Univariate Fay Herriot model with Additive Logistic Transformation for Non-Sampled Data

Description

This function gives the transformed EBLUP based on a univariate Fay-Herriot model. Random effects for sampled domains are from the fitted model and random effects for non-sampled domains are from cluster information.

Usage

saeFH.ns.uprop(
  formula,
  vardir,
  MAXITER = 100,
  PRECISION = 1e-04,
  cluster = "auto",
  data
)

Arguments

formula

an object of class formula that describe the fitted model.

vardir

vector containing the sampling variances of direct estimators for each domain. The values must be sorted as the variables in formula.

MAXITER

maximum number of iterations allowed in the Fisher-scoring algorithm, Default: 100.

PRECISION

convergence tolerance limit for the Fisher-scoring algorithm, Default: 1e-4.

cluster

Default: "auto". If cluster = "auto", then the clustering will be performed by the function by finding optimal number of cluster. If cluster is a number, then clustering will be performed based on the chosen number of cluster. If cluster is a vector containing cluster information, then the vector will be used directly to find average of random effects. Clustering is performed with k-medoids algorithms using the function pamk. If "auto" is chosen, krange are set to 2:(nrow(data)-1).

data

optional data frame containing the variables named in formula and vardir.

Value

The function returns a list with the following objects:

est

a data frame containing values of the estimators for each domains.

fit

a list containing the following objects (model is fitted using REML):

components

a data frame containing the following columns:

Examples

## Not run: 
## Load dataset
data(datasaeu.ns)

## If data is defined
Fo = y ~ x1 + x2
vardir = "vardir"
model.ns <- saeFH.ns.uprop(Fo, vardir, data = datasaeu.ns)

## If data is undefined (and option for cluster arguments)
Fo = datasaeu.ns$y ~ datasaeu.ns$x1 + datasaeu.ns$x2
vardir = datasaeu.ns$vardir

### "auto"
model.ns1 <- saeFH.ns.uprop(Fo, vardir, cluster = "auto")

### number of clusters
model.ns2 <- saeFH.ns.uprop(Fo, vardir, cluster = 2)

### vector containing cluster for each domain
model.ns3 <- saeFH.ns.uprop(Fo, vardir, cluster = datasaeu.ns$cluster)

## See the estimators
model.ns$est

## End(Not run)


[Package sae.prop version 0.1.2 Index]