ssn_initial {SSN2}R Documentation

Create a covariance parameter initial object

Description

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.

Details

Create an initial object for use with ssn_lm() or ssn_glm(). NA values can be given for ie, rotate, and scale, which lets these functions find initial values for parameters that are sometimes otherwise assumed known (e.g., rotate and scale with ssn_lm() and ssn_glm(). Parametric forms for each spatial covariance type are presented below.

tailup_type Details: Let D be a matrix of hydrologic distances, W be a diagonal matrix of weights from additive, r = D / range, and I be an identity matrix. Then parametric forms for flow-connected elements of R(zu) are given below:

Details describing the F matrix in the epa covariance are given in Garreta et al. (2010). Flow-unconnected elements of R(zu) are assumed uncorrelated. Observations on different networks are also assumed uncorrelated.

taildown_type Details: Let D be a matrix of hydrologic distances, r = D / range, and I be an identity matrix. Then parametric forms for flow-connected elements of R(zd) are given below:

Now let A be a matrix that contains the shorter of the two distances between two sites and the common downstream junction, r1 = A / range, B be a matrix that contains the longer of the two distances between two sites and the common downstream junction, r2 = B / range, and I be an identity matrix. Then parametric forms for flow-unconnected elements of R(zd) are given below:

Details describing the F1 and F2 matrices in the epa covariance are given in Garreta et al. (2010). Observations on different networks are assumed uncorrelated.

euclid_type Details: Let D be a matrix of Euclidean distances, r = D / range, and I be an identity matrix. Then parametric forms for elements of R(ze) are given below:

nugget_type Details: Let I be an identity matrix and 0 be the zero matrix. Then parametric forms for elements the nugget variance are given below:

In short, the nugget effect is modeled when nugget_type is "nugget" and omitted when nugget_type is "none".

Dispersion and random effect initial objects are specified via spmodel::dispersion_initial() and spmodel::randcov_initial(), respectively.

Value

A list with two elements: initial and is_known. initial is a named numeric vector indicating the spatial covariance parameters with specified initial and/or known values. is_known is a named numeric vector indicating whether the spatial covariance parameters in initial are known or not. The class of the list matches the the relevant spatial covariance type.

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")
tailup_initial("exponential", de = 1, range = 20, known = "given")
euclid_initial("spherical", de = 2, range = 4, scale = 0.8, known = c("range", "scale"))
dispersion_initial("nbinomial", dispersion = 5)


[Package SSN2 version 0.1.1 Index]