Learn R Programming

Rdistance (version 4.1.1)

simple.expansion: Simple polynomial expansion factors

Description

Computes simple polynomial expansion terms for use in distance analysis. The Simple (and other expansions) allow "wiggle" in estimated distance functions.

Usage

simple.expansion(x, expansions)

Value

A 3D array of size nrow(x) X ncol(x) X expansions. The 'pages' (3rd dimension) of this array are the cosine expansions of

x. i.e., page 1 is the first expansion term of x, page 2 is the second expansion term of x, etc.

Arguments

x

A numeric matrix of distances at which to evaluate the expansion series. For distance analysis, x should be the proportion of the maximum sighting distance at which a group was sighted, i.e., \(x = d/w\), where \(d\) is sighting distance and \(w\) is maximum sighting distance.

expansions

A scalar specifying the number of expansion terms to compute. Must be one of the integers 1, 2, 3, 4, or 5.

Details

The polynomials computed here are:

  • First term: $$h_1(x)=x^4,$$

  • Second term: $$h_2(x)=x^6,$$

  • Third term: $$h_3(x)=x^8,$$

  • Fourth term: $$h_4(x)=x^{10},$$

The maximum number of expansion terms computed is 4.

See Also

dfuncEstim , cosine.expansion , sine.expansion , hermite.expansion.

Examples

Run this code
x <- matrix(seq(0, 1, length = 200), ncol = 1)
simp.expn <- simple.expansion(x, 4)
plot(range(x), range(simp.expn), type="n")
matlines(x, simp.expn[,1,1:4], col=rainbow(4), lty = 1)

Run the code above in your browser using DataLab