saeFH.mprop: EBLUPs based on a Multivariate Fay Herriot model with...

View source: R/saeFH.mprop.R

saeFH.mpropR Documentation

EBLUPs based on a Multivariate Fay Herriot model with Additive Logistic Transformation

Description

This function gives the transformed EBLUP and Empirical Best Predictor (EBP) based on a multivariate Fay-Herriot model. This function is used for multinomial compositional data. If data has P as proportion and total of q categories (P_{1} + P_{2} + \dots + P_{q} = 1), then function should be used to estimate {P_{1}, P_{2}, \dots, P_{q-1}}.

Usage

saeFH.mprop(formula, vardir, MAXITER = 100, PRECISION = 1e-04, L = 1000, data)

Arguments

formula

an object of class formula that describe the fitted model.

vardir

sampling variances of direct estimations. If data is defined, it is a vector containing names of sampling variance columns. If data is not defined, it should be a data frame of sampling variances of direct estimators. The order is var1, var2, \dots, var(q-1), cov12, \dots, cov1(q-1), cov23, \dots, cov(q-2)(q-1).

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.

L

number of Monte Carlo iterations in calculating Empirical Best Predictor (EBP), Default: 1000.

data

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

Value

The function returns a list with the following objects:

est

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

  • PC : transformed EBLUP estimators using inverse alr for each category.

  • EBP : Empirical Best Predictor using Monte Carlo for each category.

fit

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

  • convergence : a logical value equal to TRUE if Fisher-scoring algorithm converges in less than MAXITER iterations.

  • iterations : number of iterations performed by the Fisher-scoring algorithm.

  • estcoef : a data frame that contains the estimated model coefficients, standard errors, t-statistics, and p-values of each coefficient.

  • refvar : estimated covariance matrix of random effects.

components

a list containing the following objects:

  • random.effects : data frame containing estimated random effect values of the fitted model for each category.

  • residuals : data frame containing residuals of the fitted model for each category.

Examples

## Not run: 
## Load dataset
data(datasaem)

## If data is defined
Fo = list(Y1 ~ X1,
          Y2 ~ X2,
          Y3 ~ X3)
vardir = c("v1", "v2", "v3", "v12", "v13", "v23")
model.data <- saeFH.mprop(Fo, vardir, data = datasaem)

Fo = list(datasaem$Y1 ~ datasaem$X1,
          datasaem$Y2 ~ datasaem$X2,
          datasaem$Y3 ~ datasaem$X3)
vardir = datasaem[, c("v1", "v2", "v3", "v12", "v13", "v23")]
model <- saeFH.mprop(Fo, vardir)

## See the estimators
model$est

## End(Not run)


sae.prop documentation built on Oct. 15, 2023, 5:06 p.m.