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 |
x |
design matrix of dimensions |
ci |
vector of censoring indicators of length |
lcl , ucl |
vectors of length |
coords |
2D spatial coordinates of dimensions |
phi0 |
initial value for the spatial scaling parameter. |
nugget0 |
initial value for the nugget effect parameter. |
type |
type of spatial correlation function: |
kappa |
parameter for some spatial correlation functions. See |
lower , upper |
vectors of lower and upper bounds for the optimization method.
If unspecified, the default is |
MaxIter |
maximum number of iterations for the EM algorithm. By default |
error |
maximum convergence error. By default |
show_se |
logical. It indicates if the standard errors should be estimated by default |
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 |
final estimation of |
beta |
estimated |
sigma2 |
estimated |
phi |
estimated |
tau2 |
estimated |
EY |
first conditional moment computed in the last iteration. |
EYY |
second conditional moment computed in the last iteration. |
SE |
vector of standard errors of |
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 |
|
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