EM.sclm {RcppCensSpatial}R Documentation

ML estimation of spatial censored linear models via the EM algorithm

Description

It fits the left, right, or interval spatial censored linear model using the Expectation-Maximization (EM) algorithm. It provides estimates and standard errors of the parameters and supports missing values on the dependent variable.

Usage

EM.sclm(y, x, ci, lcl = NULL, ucl = NULL, coords, phi0, nugget0,
  type = "exponential", kappa = NULL, lower = c(0.01, 0.01),
  upper = c(30, 30), MaxIter = 300, error = 1e-04, show_se = TRUE)

Arguments

y

vector of responses of length n.

x

design matrix of dimensions n\times q, where q is the number of fixed effects, including the intercept.

ci

vector of censoring indicators of length n. For each observation: 1 if censored/missing, 0 otherwise.

lcl, ucl

vectors of length n representing the lower and upper bounds of the interval, which contains the true value of the censored observation. Default =NULL, indicating no-censored data. For each observation: lcl=-Inf and ucl=c (left censoring); lcl=c and ucl=Inf (right censoring); and lcl and ucl must be finite for interval censoring. Moreover, missing data could be defined by setting lcl=-Inf and ucl=Inf.

coords

2D spatial coordinates of dimensions n\times 2.

phi0

initial value for the spatial scaling parameter.

nugget0

initial value for the nugget effect parameter.

type

type of spatial correlation function: 'exponential', 'gaussian', 'matern', and 'pow.exp' for exponential, gaussian, matérn, and power exponential, respectively.

kappa

parameter for some spatial correlation functions. See CovMat.

lower, upper

vectors of lower and upper bounds for the optimization method. If unspecified, the default is c(0.01,0.01) for lower and c(30,30) for upper.

MaxIter

maximum number of iterations for the EM algorithm. By default =300.

error

maximum convergence error. By default =1e-4.

show_se

logical. It indicates if the standard errors should be estimated by default =TRUE.

Details

The spatial Gaussian model is given by

Y = X\beta + \xi,

where Y is the n\times 1 response vector, X is the n\times q design matrix, \beta is the q\times 1 vector of regression coefficients to be estimated, and \xi is the error term. Which is normally distributed with zero-mean and covariance matrix \Sigma=\sigma^2 R(\phi) + \tau^2 I_n. We assume that \Sigma is non-singular and X has a full rank (Diggle and Ribeiro 2007).

The estimation process is performed via the EM algorithm, initially proposed by Dempster et al. (1977). The conditional expectations are computed using the function meanvarTMD available in the package MomTrunc.

Value

An object of class "sclm". Generic functions print and summary have methods to show the results of the fit. The function plot can extract convergence graphs for the parameter estimates.

Specifically, the following components are returned:

Theta

estimated parameters in all iterations, \theta = (\beta, \sigma^2, \phi, \tau^2).

theta

final estimation of \theta = (\beta, \sigma^2, \phi, \tau^2).

beta

estimated \beta.

sigma2

estimated \sigma^2.

phi

estimated \phi.

tau2

estimated \tau^2.

EY

first conditional moment computed in the last iteration.

EYY

second conditional moment computed in the last iteration.

SE

vector of standard errors of \theta = (\beta, \sigma^2, \phi, \tau^2).

InfMat

observed information matrix.

loglik

log-likelihood for the EM method.

AIC

Akaike information criterion.

BIC

Bayesian information criterion.

Iter

number of iterations needed to converge.

time

processing time.

call

RcppCensSpatial call that produced the object.

tab

table of estimates.

critFin

selection criteria.

range

effective range.

ncens

number of censored/missing observations.

MaxIter

maximum number of iterations for the EM algorithm.

Note

The EM final estimates correspond to the estimates obtained at the last iteration of the EM algorithm.

To fit a regression model for non-censored data, just set ci as a vector of zeros.

Author(s)

Katherine L. Valeriano, Alejandro Ordoñez, Christian E. Galarza, and Larissa A. Matos.

References

Dempster AP, Laird NM, Rubin DB (1977). “Maximum likelihood from incomplete data via the EM algorithm.” Journal of the Royal Statistical Society: Series B (Methodological), 39(1), 1–38.

Diggle P, Ribeiro P (2007). Model-based Geostatistics. Springer.

See Also

MCEM.sclm, SAEM.sclm, predict.sclm

Examples

# Simulated example: 10% of left-censored observations
set.seed(1000)
n = 50   # Test with another values for n
coords = round(matrix(runif(2*n,0,15),n,2), 5)
x = cbind(rnorm(n), runif(n))
data = rCensSp(c(-1,3), 2, 4, 0.5, x, coords, "left", 0.10, 0, "gaussian")

fit = EM.sclm(y=data$y, x=x, ci=data$ci, lcl=data$lcl, ucl=data$ucl,
              coords=coords, phi0=3, nugget0=1, type="gaussian")
fit

[Package RcppCensSpatial version 0.3.0 Index]