| sk_bds | R Documentation |
Returns a data-frame of initial values and upper/lower bounds on covariance
parameters for the Kronecker covariance model defined by the correlation function
names in pars.
sk_bds(pars, g, var_obs = NULL, var_mult = 2)
pars |
list or character vector of 1-2 kernel names (see |
g |
a sk grid (or any object accepted by |
var_obs |
positive numeric, the sample variance of data |
var_mult |
numeric > 1, constant to multiply by |
Range parameters (y.rho and x.rho) are bounded by the shortest and longest
inter-point distances along the corresponding dimension (y or x). This is
computed by taking the element-wise product of dimensions and resolution, ie
g$gres * dim(g). Ranges are initialized to the geometric mean of the upper
and lower bounds.
Variance bounds are centered around var_obs, which by default is set to the sample
variance of the data in g. eps (measurement variance) and psill (partial
sill) are both initialized to one half of var_obs, bounded above by var_obs
times var_mult, and bounded below by a small positive number (1e-6). Note that
while eps=0 produces valid models in theory, in practice eps>0 is often
necessary for numerical stability.
Shape parameter bounds are hard-coded, and are set conservatively to avoid problems
with numerical precision in functions like exp and gamma when evaluating very
large or small distances.
a data frame of initial values and lower/upper bounds for the parameters in pars
sk
Other parameter managers:
sk_fit(),
sk_kp(),
sk_pars(),
sk_pars_make(),
sk_pars_update(),
sk_to_string()
gdim = c(10, 15)
g = sk(gdim)
g[] = stats::rnorm(length(g))
sk_bds('mat', g)
# same result by passing in observed variance
sk_bds('mat', g, stats::var(g[]))
# a less conservative bound for variance (only eps and psill affected)
sk_bds('mat', g, var_mult=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.