fitSTREBLUP: fitSTREBLUP

Description Usage Arguments Examples

View source: R/fitSTREBLUP.R

Description

Wrapper function for the estimation of the spatio-temporal-robust-EBLUP

Usage

1
2
3
4
5
fitSTREBLUP(formula, dat, beta, sigma, rho,
  sigmaSamplingError = seSigmaClosure(nDomains, nTime)(),
  nDomains = getNDomains(dat), nTime = getNTime(dat),
  w0 = w0Matrix(nDomains), w = w0/rowSums(w0), tol = 0.001,
  method = "Nelder-Mead", maxIter = 500, k = 1.345)

Arguments

formula

formula for the fixed effects part

dat

data with dependent and independent variable as they are used in formula. The data should contain a variable Domain and Time indicating the domain and time period for each observation respectively

beta,

sigma, rho start values for the parameters

sigmaSamplingError

True variances for the sampling errors

nDomains

the number of domains. Will be determined by default, see dat

nTime

the number of time periods. Will be determined by default, see dat

w0

proximity matrix

w

at the moment row-standardized proximity matrix

tol

numerical tolerance for algorithm

method

method used by the function optim

maxIter

maximal number of iterations - ignored in the function optim. Relevant for "global" algorithm and for the optimization of beta

Examples

1
2
3
4
5
6
7
require(spatioTemporalData); require(SAE)
set.seed(3)
setup <- simSetupMarhuenda(nDomains=30, nTime=5, sarCorr=0.5, arCorr=0.5, n = 200)
output <- simRunMarhuenda(setup)
dat <- slot(output[[1]], "data")[[1]]
result <- fitSTREBLUP(y~x, dat, c(0,1), c(1,1), c(0.5,0.5))
summary(result)

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