simple.expansion function

Calculate simple polynomial expansion for detection function likelihoods

Calculate simple polynomial expansion for detection function likelihoods

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

simple.expansion(x, expansions)

Arguments

  • x: In a distance analysis, x is a numeric vector of the proportion of a strip transect's half-width at which a group of individuals were sighted. If ww is the strip transect half-width or maximum sighting distance, and dd is the perpendicular off-transect distance to a sighted group (d<=wd <= w), x is usually d/wd/w. More generally, x is a vector of numeric values
  • expansions: A scalar specifying the number of expansion terms to compute. Must be one of the integers 1, 2, 3, or 4.

Returns

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

Details

The polynomials computed here are:

  • First term :
h1(x)=x4,h1(x)=x4, h_1(x)=x^4,h1(x) = x^4,
  • Second term :
h2(x)=x6,h2(x)=x6, h_2(x)=x^6,h2(x) = x^6,
  • Third term :
h3(x)=x8,h3(x)=x8, h_3(x)=x^8,h3(x) = x^8,
  • Fourth term :
h4(x)=x10,h4(x)=x10, h_4(x)=x^{10},h4(x) = x^10,

The maximum number of expansion terms computed is 4.

Examples

x <- seq(0, 1, length = 200) simp.expn <- simple.expansion(x, 4) plot(range(x), range(simp.expn), type="n") matlines(x, simp.expn, col=rainbow(4), lty = 1)

See Also

dfuncEstim, cosine.expansion, hermite.expansion

  • Maintainer: Trent McDonald
  • License: GNU General Public License
  • Last published: 2025-04-10