https://github.com/cran/forecast
Raw File
Tip revision: 9cbbc2e5b6ff4acd5192703b3afc236c070046b7 authored by Rob Hyndman on 18 January 2019, 09:50:03 UTC
version 8.5
Tip revision: 9cbbc2e
na.interp.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clean.R
\name{na.interp}
\alias{na.interp}
\title{Interpolate missing values in a time series}
\usage{
na.interp(x, lambda = NULL)
}
\arguments{
\item{x}{time series}

\item{lambda}{Box-Cox transformation parameter. If \code{lambda="auto"},
then a transformation is automatically selected using \code{BoxCox.lambda}.
The transformation is ignored if NULL. Otherwise,
data transformed before model is estimated.}
}
\value{
Time series
}
\description{
Uses linear interpolation for non-seasonal series. For seasonal series, a 
robust STL decomposition is used. A linear interpolation is applied to the 
seasonally adjusted data, and then the seasonal component is added back.
}
\details{
A more general and flexible approach is available using \code{na.approx} in
the \code{zoo} package.
}
\examples{

data(gold)
plot(na.interp(gold))

}
\seealso{
\code{\link[forecast]{tsoutliers}}
}
\author{
Rob J Hyndman
}
\keyword{ts}
back to top