DiagStempCens {StempCens} | R Documentation |
Diagnostic in spatio-temporal model with censored/missing responses
Description
Return measures and graphics for diagnostic analysis in spatio-temporal model with censored/missing responses.
Usage
DiagStempCens(Est.StempCens, type.diag = "individual", diag.plot = TRUE,
ck)
Arguments
Est.StempCens |
an object of class |
type.diag |
type of diagnostic: ' |
diag.plot |
|
ck |
the value for |
Details
This function uses the case deletion approach to study the impact of deleting one or more observations from the dataset on the parameters estimates, using the ideas of Cook (1977) and Zhu et al. (2001). The measure is defined by
GD_i(\theta*)=(\theta* - \theta*[i])'[-Q**(\theta|\theta*)](\theta* - \theta*[i]), i=1,....m,
where \theta*
is the estimate of \theta
using the complete data, \theta*[i]
are the estimates obtained after deletion of the i-th observation (or group of observations) and
Q**(\theta|\theta*)
is the Hessian matrix.
We can eliminate an observation, an entire location or an entire time index.
Value
The function returns a list with the diagnostic measures.
- If
type.diag == individual | time | location
: -
GD
is a data.frame with the index value of the observation and the GD measure. - If
type.diag == all
: -
GDind
is a data.frame with the index value of the observation and the GD measure for individual.GDtime
is a data.frame with the time index value and the GD measure for time.GDloc
is a data.frame with the side index value and the GD measure for location.
Author(s)
Katherine L. Valeriano, Victor H. Lachos and Larissa A. Matos
See Also
Examples
set.seed(12345)
# Parameter values
beta <- c(-1,1.5)
phi <- 3
rho <- 0.40
tau2 <- 1
sigma2 <- 2
# Simulating data
coord <- matrix(runif(10, 0, 10), ncol=2) # Cartesian coordinates without repetitions
time <- as.matrix(1:5) # Time index without repetitions
x <- cbind(rexp(25,2), rnorm(25,2,1))
data <- rnStempCens(x, time, coord, beta, phi, rho, tau2, sigma2,
type.S="exponential", cens="right", pcens=0.20)
data$yObs[17] <- abs(data$yObs[17]) + 2*sd(data$yObs) # perturbed observation
# Estimation
est <- EstStempCens(y=data$yObs, x, cc=data$ci, data$time, cbind(data$x.coord,data$y.coord),
LI=data$lcl, LS=data$ucl, init.phi=2.5, init.rho=0.5, init.tau2=0.8,
type.Data="balanced", method="nlminb", kappa=0, type.S="exponential",
IMatrix=TRUE, lower.lim=c(0.01,-0.99,0.01), upper.lim=c(30,0.99,20), M=20,
perc=0.25, MaxIter=300, pc=0.20)
# Diagnostic
set.seed(12345)
diag <- DiagStempCens(est, type.diag="time", diag.plot = TRUE, ck=1)