smooth_time | R Documentation |
A full sspm formula contains calls to the smoothing terms smooth_time()
,
smooth_space()
, smooth_space_time()
.
smooth_time(
data_frame,
boundaries,
time,
type = "ICAR",
k = NULL,
bs = "re",
xt = NA,
is_spm = FALSE,
...
)
smooth_space(
data_frame,
boundaries,
time,
type = "ICAR",
k = NULL,
bs = "mrf",
xt = NULL,
is_spm = FALSE,
...
)
smooth_space_time(
data_frame,
boundaries,
time,
type = "ICAR",
k = c(NA, 30),
bs = c("re", "mrf"),
xt = list(NA, NULL),
is_spm = FALSE,
...
)
smooth_lag(
var,
data_frame,
boundaries,
time,
type = "LINPRED",
k = 5,
m = 1,
...
)
## S4 method for signature 'sf,sspm_discrete_boundary'
smooth_time(
data_frame,
boundaries,
time,
type = "ICAR",
k = NULL,
bs = "re",
xt = NA,
is_spm = FALSE,
...
)
## S4 method for signature 'sf,sspm_discrete_boundary'
smooth_space(
data_frame,
boundaries,
time,
type = "ICAR",
k = NULL,
bs = "mrf",
xt = NULL,
is_spm = FALSE,
...
)
## S4 method for signature 'sf,sspm_discrete_boundary'
smooth_space_time(
data_frame,
boundaries,
time,
type = "ICAR",
k = c(NA, 30),
bs = c("re", "mrf"),
xt = list(NA, NULL),
is_spm = FALSE,
...
)
## S4 method for signature 'ANY,sf,sspm_discrete_boundary'
smooth_lag(
var,
data_frame,
boundaries,
time,
type = "LINPRED",
k = 5,
m = 1,
...
)
data_frame |
[sf data.frame] The data. |
boundaries |
[sspm_boundary] An object of class sspm_discrete_boundary. |
time |
[character] The time column. |
type |
[character] Type of smooth, currently only "ICAR" is supported. |
k |
[numeric] Size of the smooths and/or size of the lag. |
bs |
a two letter character string indicating the (penalized) smoothing basis to use.
(eg |
xt |
Any extra information required to set up a particular basis. Used
e.g. to set large data set handling behaviour for |
is_spm |
Whether or not an SPM is being fitted (used internally) |
... |
a list of variables that are the covariates that this
smooth is a function of. Transformations whose form depends on
the values of the data are best avoided here: e.g. |
var |
[symbol] Variable (only for smooth_lag). |
m |
The order of the penalty for this term (e.g. 2 for
normal cubic spline penalty with 2nd derivatives when using
default t.p.r.s basis). |
A list of 2 lists:
args
, contains the arguments to be passed on to the mgcv smooths
vars
, contains variables relevant to the evaluation of the smooth.
## Not run:
# Not meant to be used directly
smooth_time(borealis_data, bounds_voronoi, time = "year")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.