Learn R Programming

Rdistance (version 1.2.2)

hermite.expansion: Calcululation of Hermite expansion for detection function likelihoods.

Description

Computes the Hermite expansion terms used in the likelihood of a distance analysis. More generally, will compute a Hermite expansion of any numeric vector.

Usage

hermite.expansion(x, expansions)

Arguments

x
In a distance analysis, x is a numeric vector containing the proportion of a strip transect's half-width at which a group of individuals was sighted. If $w$ is the strip transect half-width or maximum sighting distance, and $d$ is th
expansions
A scaler specifying the number of expansion terms to compute. Must be one of the integers 1, 2, 3, or 4.

Value

  • A matrix of size length(x) X expansions. The columns of this matrix are the Hermite polynomial expansions of x. Column 1 is the first expansion term of x, column 2 is the second expansion term of x, and so on up to expansions.

Details

There are, in general, several expansions that can be called Hermite. The Hermite expansion used here is:
  • First term:$$h_1(x)=x^4 - 6x^2 + 3,$$
  • Second term:$$h_2(x)=x^6 - 15x^4 + 45x^2 - 15,$$
  • Third term:$$h_3(x)=x^8 - 28x^6 + 210x^4 - 420x^2 + 105,$$
  • Fourth term:$$h_4(x)=x^10 - 45x^8 + 630x^6 - 3150x^4 + 4725x^2 - 945,$$
The maximum number of expansion terms computed is 4.

See Also

F.dfunc.estim, cosine.expansion, simple.expansion, and the discussion of user defined likelihoods in F.dfunc.estim.

Examples

Run this code
set.seed(83828233)
x <- rnorm(1000) * 100
x <- x[ 0 < x & x < 100 ]
herm.expn <- hermite.expansion( x, 5 )

Run the code above in your browser using DataLab