Skip to contents

Create a covariance parameter initial object that specifies initial and/or known values to use while estimating specific covariance parameters with ssn_lm() or ssn_glm(). See spmodel::randcov_initial() for documentation regarding random effect covariance parameter initial objects.

Usage

tailup_initial(tailup_type, de, range, known)

taildown_initial(taildown_type, de, range, known)

euclid_initial(euclid_type, de, range, rotate, scale, known)

nugget_initial(nugget_type, nugget, known)

Arguments

tailup_type

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

de

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

range

The correlation parameter.

known

A character vector indicating which covariance parameters are to be assumed known. The value "given" is shorthand for assuming all covariance parameters given to *_initial() are assumed known.

taildown_type

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

euclid_type

The euclidean covariance function type. Available options include "spherical", "exponential", "gaussian", "cosine", "cubic", "pentaspherical", "wave", "jbessel", "gravity", "rquad", "magnetic", 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.

nugget_type

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

nugget

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

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_initial("exponential", de = 1, range = 20, known = "range")
#> $initial
#>    de range 
#>     1    20 
#> 
#> $is_known
#>    de range 
#> FALSE  TRUE 
#> 
#> attr(,"class")
#> [1] "tailup_exponential"
tailup_initial("exponential", de = 1, range = 20, known = "given")
#> $initial
#>    de range 
#>     1    20 
#> 
#> $is_known
#>    de range 
#>  TRUE  TRUE 
#> 
#> attr(,"class")
#> [1] "tailup_exponential"
euclid_initial("spherical", de = 2, range = 4, scale = 0.8, known = c("range", "scale"))
#> $initial
#>    de range scale 
#>   2.0   4.0   0.8 
#> 
#> $is_known
#>    de range scale 
#> FALSE  TRUE  TRUE 
#> 
#> attr(,"class")
#> [1] "euclid_spherical"
dispersion_initial("nbinomial", dispersion = 5)
#> $initial
#> dispersion 
#>          5 
#> 
#> $is_known
#> dispersion 
#>      FALSE 
#> 
#> attr(,"class")
#> [1] "nbinomial"