pkern_bds | R Documentation |
Returns a data-frame of initial values and upper/lower bounds on covariance
parameters for the kernel names in pars
.
pkern_bds(pars, g, var_obs = NULL, var_mult = 2)
pars |
list or character vector of 1-2 kernel names (see |
g |
list, a pkern grid definition (or 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 * g$gdim
. Ranges are initialized to the geometric mean of the upper
and lower bounds.
Variance bounds centered around var_obs
, which by default is set to the sample
variance of the data in g$gval
. 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
gdim = c(10, 15)
z = prod(gdim) |> rnorm()
g = pkern_grid(gdim) |> modifyList(list(gval=z))
pkern_bds('mat', g)
pkern_bds('mat', g, lower=0)
pkern_bds('mat', g, rows=c('eps', 'psill'), lower=c(0, 0.5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.