View source: R/rCensspatial_USER.R
rCensSp | R Documentation |
It simulates censored spatial data with a linear structure for an established censoring rate.
rCensSp(beta, sigma2, phi, nugget, x, coords, cens = "left", pcens = 0.1, npred = 0, cov.model = "exponential", kappa = NULL)
beta |
linear regression parameters. |
sigma2 |
partial sill parameter. |
phi |
spatial scaling parameter. |
nugget |
nugget effect parameter. |
x |
design matrix of dimensions n\times q. |
coords |
2D spatial coordinates of dimensions n\times 2. |
cens |
|
pcens |
desired censoring rate. By default |
npred |
number of simulated data used for cross-validation (Prediction). By default |
cov.model |
type of spatial correlation function: |
kappa |
parameter for some spatial correlation functions. For exponential and
gaussian |
If npred > 0
, it returns two lists: Data
and
TestData
; otherwise, it returns a list with the simulated data.
Data
y |
response vector. |
ci |
censoring indicator. |
lcl |
lower censoring bound. |
ucl |
upper censoring bound. |
coords |
coordinates matrix. |
x |
design matrix. |
TestData
y |
response vector. |
coords |
coordinates matrix. |
x |
design matrix. |
Katherine L. Valeriano, Alejandro Ordoñez, Christian E. Galarza, and Larissa A. Matos.
n = 100 set.seed(1000) coords = round(matrix(runif(2*n,0,15),n,2), 5) x = cbind(1, rnorm(n)) data = rCensSp(beta=c(5,2), sigma2=2, phi=4, nugget=0.70, x=x, coords=coords, cens="left", pcens=0.10, npred=10, cov.model="gaussian") data$Data data$TestData
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.