% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simple.expansion.r
\name{simple.expansion}
\alias{simple.expansion}
\title{Simple polynomial expansion factors}
\usage{
simple.expansion(x, expansions)
}
\arguments{
\item{x}{A numeric matrix of distances at which to evaluate 
the expansion series. For distance analysis, \code{x} should
be the proportion of the maximum sighting distance
at which a group was sighted, i.e., \eqn{x = d/w}, where \eqn{d}
is sighting distance and \eqn{w} is maximum sighting distance.}

\item{expansions}{A scalar specifying the number of 
expansion terms to compute. Must be one of the 
integers 1, 2, 3, 4, or 5.}
}
\value{
A 3D array of size \code{nrow(x)} X \code{ncol(x)} X \code{expansions}.
  The 'pages' (3rd dimension) of this array are the cosine expansions of 
  \code{x}. i.e., page 1 is the first expansion term of \code{x}, 
  page 2 is the second expansion term of \code{x}, etc.
}
\description{
Computes simple polynomial expansion terms 
for use in distance analysis. The Simple (and other expansions) 
allow "wiggle" in estimated distance functions.
}
\details{
The polynomials computed here are:
  \itemize{
    \item \bold{First term}: \deqn{h_1(x)=x^4,}{h1(x) = x^4,}
    \item \bold{Second term}: \deqn{h_2(x)=x^6,}{h2(x) = x^6,}
    \item \bold{Third term}: \deqn{h_3(x)=x^8,}{h3(x) = x^8,}
    \item \bold{Fourth term}: \deqn{h_4(x)=x^{10},}{h4(x) = x^10,}
  }
  The maximum number of expansion terms computed is 4.
}
\examples{
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)

}
\seealso{
\code{\link{dfuncEstim}}
, \code{\link{cosine.expansion}}
, \code{\link{sine.expansion}}
, \code{\link{hermite.expansion}}.
}
