rnStempCens {StempCens} | R Documentation |
Censored spatio-temporal data simulation
Description
It simulates balanced censored spatio-temporal data with a linear structure for an established censoring rate o limit of detection.
Usage
rnStempCens(x, time, coords, beta, phi, rho, tau2, sigma2,
type.S = "exponential", kappa = 0, cens = "left", pcens = 0.1,
lod = NULL)
Arguments
x |
design matrix of dimensions |
time |
vector containing the unique time points at which the observations are made, of length |
coords |
2D unique spatial coordinates of dimension |
beta |
linear regression parameters. |
phi |
value of the spatial scaling parameter. |
rho |
value of the time scaling parameter. |
tau2 |
value of the the nugget effect parameter. |
sigma2 |
value of the partial sill. |
type.S |
type of spatial correlation function: ' |
kappa |
parameter for all spatial covariance functions. In the case of exponential, gaussian and spherical function |
cens |
' |
pcens |
desired censoring rate. By default= |
lod |
desired detection limit for censored observations. By default= |
Value
The function returns a data.frame containing the simulated data.
Author(s)
Katherine L. Valeriano, Victor H. Lachos and Larissa A. Matos
Examples
set.seed(1000)
# Initial parameter values
phi <- 5
rho <- 0.45
tau2 <- 0.80
sigma2 <- 2
beta <- c(1, 2.5)
x <- cbind(1, rnorm(50))
# Coordinates
coords <- matrix(runif(20, 0, 10), ncol=2) # Cartesian coordinates without repetitions
time <- 1:5 # Time index without repetitions
# Data simulation
data <- rnStempCens(x, time, coords, beta, phi, rho, tau2, sigma2,
type.S="exponential", cens="left", pcens=0.10)