func.cle.prop {clespr} | R Documentation |
Composite Likelihood Estimation for Spatial Proportional Data
Description
func.cle.prop
performs composite likelihood estimation of parameters and their standard errors in a spatial Tobit model by maximizing its composite log-likelihood.
Usage
func.cle.prop(vec.yobs, mat.X, mat.lattice, radius, n.sim = 100,
parallel = TRUE, n.core = max(detectCores()/2, 1), output = TRUE)
Arguments
vec.yobs |
a vector of observed responses for all N sites. |
mat.X |
regression (design) matrix, including intercepts. |
mat.lattice |
a data matrix containing geographical information of sites. The i-th row constitutes a set of geographical coordinates. |
radius |
weight radius. |
n.sim |
number of simulations used for calculate the Godambe matrix (default: 100). |
parallel |
logical flag indicating using parallel processing (default: |
n.core |
number of physical cores used for parallel processing (when |
output |
logical flag indicates whether printing out result (default: |
Details
Given the design matrix, the vector of observed responses, spatial lattice data, weight radius, and the prespecified number of simulated vectors of responses used in estimating the Godambe information matrix, this function assumes initial values of \beta
as the estimates from the standard Type I Tobit model with independent responses. The initial value of \alpha
and the right limit of the Tobit model are equally set to 1. Since there is only one cutoff point to be estimated, reparameterization is unnecessary. The function first estimates parameters of interest by maximizing the composite log-likelihood using optim(...,method = "L-BFGS-B")
, then computes the simulated based standard error and asymptotic covariance matrix.
Value
func.cle.prop
returns a list containing:
vec.par
: a vector of estimator for \theta=(\alpha,\beta,\sigma^2,\rho)
;
vec.se
: a vector of standard error for the estimator;
mat.asyvar
: estimated asymptotic covariance matrix H^{-1}(\theta)J(\theta)H^{-1}(\theta)
for the estimator; and
vec.comp
: a vector of computational time for parameter and standard error estimation.
CLIC
: Composite likelihood information criterion proposed by Varin and Vidoni (2005), i.e. -2*logCL(\theta) + 2*trace(H^{-1}(\theta)J(\theta))
References
Feng, Xiaoping, Zhu, Jun, Lin, Pei-Sheng, and Steen-Adams, Michelle M. (2014) Composite likelihood Estimation for Models of Spatial Ordinal Data and Spatial Proportional Data with Zero/One values. Environmetrics 25(8): 571–583.
Examples
# True parameter
alpha <- 4; vec.beta <- c(1, 2, 1, 0, -1); sigmasq <- 0.8; rho <- 0.6; radius <- 5
vec.par <- c(alpha, vec.beta, sigmasq, rho)
# Coordinate matrix
n.lati <- 30; n.long <- 30
n.site <- n.lati * n.long
mat.lattice <- cbind(rep(1:n.lati, n.long), rep(1:n.long, each=n.lati))
mat.dist <- as.matrix(dist(mat.lattice, upper=TRUE, diag=TRUE))
mat.cov <- sigmasq * rho^mat.dist
set.seed(1228)
# Generate regression (design) matrix with intercept
mat.X <- cbind(rep(1, n.site),scale(matrix(rnorm(n.site*(length(vec.beta)-1)),nrow=n.site)))
vec.Z <- t(chol(mat.cov)) %*% rnorm(n.site) + mat.X %*% vec.beta
vec.epsilon <- diag(sqrt(1-sigmasq), n.site) %*% rnorm(n.site)
vec.ylat <- as.numeric(vec.Z + vec.epsilon)
# Convert to the vector of observation
vec.yobs <- func.obs.prop(vec.ylat, alpha=alpha)
# With parallel computing
## Not run:
prop.example <- func.cle.prop(vec.yobs, mat.X, mat.lattice, radius,
n.sim=100, parallel = TRUE, n.core = 2)
round(prop.example$vec.par,4)
# alpha beta0 beta1 beta2 beta3 beta4 sigma^2 rho
# 3.8259 0.9921 1.9679 0.9455 0.0148 -0.9871 0.8386 0.5761
round(prop.example$vec.se ,4)
# alpha beta0 beta1 beta2 beta3 beta4 sigma^2 rho
# 0.1902 0.1406 0.1103 0.0744 0.0385 0.0652 0.1527 0.1151
## End(Not run)
# Without parallel computing
## Not run:
prop.example2 <- func.cle.prop(vec.yobs, mat.X, mat.lattice, radius, n.sim=100, parallel = FALSE)
## End(Not run)