- sp_list
A list containing the spatial coordinates and the observations.
Should include the following components:
x: A numeric vector of x-coordinates (e.g., longitude).
y: A numeric vector of y-coordinates (e.g., latitude).
obs: A 3D array of observations with dimensions
length(x) × length(y) × n.
- level
A optional numeric threshold value used to test whether the
estimated mean surface significantly deviates from it. Default is NULL.
- data_fit
A design matrix used to fit the generalized least squares
(GLS) model. Each row corresponds to an observation, and each column to a covariate
to be included in the model. Outcome/observation should not be included.
The first column is typically an intercept column,
which will contain only 1s, if an intercept is included in the model.
Categorical variables in data_fit should be converted to dummy variables.
Default is matrix(1, n, 1) (only keep the intercept term)
- w
A numeric vector specifying the target function for constructing the SCB,
by giving a linear combination of the regression coefficients in the GLS model.
Default is matrix(1, 1, 1), will only construct the SCB for the first regression
coefficient.
- correlation
A character string specifying the name of
the correlation structure (e.g., "corAR1", "corCompSymm")
to be used in the GLS model. If NULL, no correlation structure is assumed.
- corpar
A list containing parameters to be passed to
the correlation structure function specified in correlation.
- groups
A vector of group identifiers used to define
the within-group correlation structure (e.g., repeated measures, time blocks).
If not specified, defaults to rep(1, n), assuming all observations
belong to a single group.
- V
An optional array of known covariance matrices of
shape [length(x), length(y), n, n], where each V[i,j,,]
corresponds to the covariance matrix for the observations at spatial location
(x[i], y[j]). If V is given, then the GLS model will be fitted based on V.
Otherwise, the GLS model will be fitted based on correlation structure.
If neither is provided, the model reduces to ordinary least squares (OLS) regression.
- alpha
A numerical value specifying the confidence level
for the Simultaneous Confidence Bands. Defalut is 0.1.
- N
An integer specifying the number of bootstrap samples to
construct the Simultaneous Confidence Bands. Default is 1000.
- mask
An optional logical matrix same dimensions as
c(length(sp_list$x), length(sp_list$y)), indicating spatial locations to
include in the SCB computation. Non-included locations (e.g., water areas)
should be set to 0 or NA.
Default is array(1, dim = c(length(sp_list$x), length(sp_list$y)))