Create a covariance parameter object for use with other functions. See spmodel::randcov_params() for documentation regarding random effect covariance parameter objects.

tailup_params(tailup_type, de, range)

taildown_params(taildown_type, de, range)

euclid_params(euclid_type, de, range, rotate, scale, extra)

nugget_params(nugget_type, nugget)

Arguments

tailup_type

The tailup covariance function type. Available options include "linear", "spherical", "exponential", "mariah", "epa", "gaussian", "wave", and "none".

de

The spatially dependent (correlated) random error variance. Commonly referred to as a partial sill.

range

The correlation parameter.

taildown_type

The taildown covariance function type. Available options include "linear", "spherical", "exponential", "mariah", "epa", "gaussian", "wave", and "none".

euclid_type

The Euclidean covariance function type. Available options include "spherical", "exponential", "gaussian", "circular", "cubic", "pentaspherical", "wave", "jbessel", "gravity", "rquad", "magnetic", "matern", "cauchy", "pexponential", and "none".

rotate

Anisotropy rotation parameter (from 0 to \(\pi\) radians) for the Euclidean portion of the covariance. A value of 0 (the default) implies no rotation.

scale

Anisotropy scale parameter (from 0 to 1) for the Euclidean portion of the covariance. A value of 1 (the default) implies no scaling.

extra

An extra covariance parameter used when spcov_type is "matern", "cauchy", "pexponential".

nugget_type

The nugget covariance function type. Available options include "nugget" or "none".

nugget

The spatially independent (uncorrelated) random error variance. Commonly referred to as a nugget.

Value

A named numeric vector of covariance parameters with class that matches the relevant type argument.

Details

Generally, all arguments to tailup_params(), taildown_params(), euclid_params(), and nugget_params() must be specified, though default arguments are chosen when the relevant _type is "none". For full parameterizations of all tailup, taildown, Euclidean, and nugget covariance functions, see tailup_initial(), taildown_initial(), euclid_initial(), and nugget_initial().

References

Peterson, E.E. and Ver Hoef, J.M. (2010) A mixed-model moving-average approach to geostatistical modeling in stream networks. Ecology 91(3), 644–651.

Ver Hoef, J.M. and Peterson, E.E. (2010) A moving average approach for spatial statistical models of stream networks (with discussion). Journal of the American Statistical Association 105, 6–18. DOI: 10.1198/jasa.2009.ap08248. Rejoinder pgs. 22–24.

Examples

tailup_params("exponential", de = 1, range = 20)
#>    de range 
#>     1    20 
#> attr(,"class")
#> [1] "tailup_exponential"
taildown_params("exponential", de = 1, range = 20)
#>    de range 
#>     1    20 
#> attr(,"class")
#> [1] "taildown_exponential"
euclid_params("exponential", de = 1, range = 20, rotate = 0, scale = 1)
#>     de  range rotate  scale 
#>      1     20      0      1 
#> attr(,"class")
#> [1] "euclid_exponential"
euclid_params("matern", de = 1, range = 20, extra = 1)
#> Error in euclid_params("matern", de = 1, range = 20, extra = 1): unused argument (extra = 1)
nugget_params("nugget", nugget = 1)
#> nugget 
#>      1 
#> attr(,"class")
#> [1] "nugget_nugget"