summaryrefslogtreecommitdiff
path: root/man/detrend.Rd
diff options
context:
space:
mode:
Diffstat (limited to 'man/detrend.Rd')
-rw-r--r--man/detrend.Rd39
1 files changed, 39 insertions, 0 deletions
diff --git a/man/detrend.Rd b/man/detrend.Rd
new file mode 100644
index 0000000..b63d3a0
--- /dev/null
+++ b/man/detrend.Rd
@@ -0,0 +1,39 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/detrend.R
+\name{detrend}
+\alias{detrend}
+\title{Remove linear trends}
+\usage{
+detrend(data, type = c("constant", "linear")[2])
+}
+\arguments{
+\item{data}{an object of class \code{idframe}}
+
+\item{type}{trend type - "constant" or "linear". (Default: \code{"linear"})}
+}
+\value{
+A list containing the following elements
+
+\tabular{ll}{
+ \code{fitted.values} \tab \code{idframe} object with detrended variables \cr
+ \code{output.trend} \tab \code{list} containing trend fits for each output
+ variable \cr
+ \code{input.trend} \tab \code{list} containing trend fits for each input
+ variable
+ }
+}
+\description{
+Removes the mean value or linear trends in each of the input and output matrices.
+}
+\examples{
+data(cstr)
+fit <- detrend(cstr) # remove linear trends
+Zdetrend <- predict(fit) # get the detrended data
+
+demean <- detrend(cstr,type="constant") # remove mean values
+Zcent <- predict(demean) # get the centered data
+}
+\seealso{
+\code{\link{predict.detrend}}, \code{\link[stats]{lm}}
+}
+