Description Usage Arguments Details Value Author(s) See Also Examples
Computes the Hermite expansion terms used in the likelihood of a distance analysis. More generally, will compute a Hermite expansion of any numeric vector.
1 | hermite.expansion(x, expansions)
|
x |
In a distance analysis, |
expansions |
A scalar specifying the number of expansion terms to compute. Must be one of the integers 1, 2, 3, or 4. |
There are, in general, several expansions that can be called Hermite. The Hermite expansion used here is:
First term:
h1(x) = x^4 - 6*(x)^2 +3,
Second term:
h2(x) = (x)^6 - 15*(x)^4 + 45*(x)^2 - 15,
Third term:
h3(x) = (x)^8 - 28*(x)^6 + 210*(x)^4 - 420*(x)^2 + 105,
Fourth term:
h4(x) = (x)^10 - 45*(x)^8 + 630*(x)^6 - 3150*(x)^4 + 4725*(x)^2 - 945,
The maximum number of expansion terms computed is 4.
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
.
Trent McDonald, WEST Inc. tmcdonald@west-inc.com Aidan McDonald, WEST Inc. aidan@mcdcentral.org
dfuncEstim
, cosine.expansion
, simple.expansion
, and the discussion
of user defined likelihoods in dfuncEstim
.
1 2 3 4 | set.seed(83828233)
x <- rnorm(1000) * 100
x <- x[0 < x & x < 100]
herm.expn <- hermite.expansion(x, 3)
|
Rdistance (version 1.3.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.