File: sindexf.Rd

package info (click to toggle)
r-cran-forecast 8.13-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,248 kB
  • sloc: cpp: 975; ansic: 648; sh: 13; makefile: 2
file content (37 lines) | stat: -rw-r--r-- 934 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/season.R
\name{sindexf}
\alias{sindexf}
\title{Forecast seasonal index}
\usage{
sindexf(object, h)
}
\arguments{
\item{object}{Output from \code{\link[stats]{decompose}} or
\link[stats]{stl}.}

\item{h}{Number of periods ahead to forecast}
}
\value{
Time series
}
\description{
Returns vector containing the seasonal index for \code{h} future periods. If
the seasonal index is non-periodic, it uses the last values of the index.
}
\examples{
uk.stl <- stl(UKDriverDeaths,"periodic")
uk.sa <- seasadj(uk.stl)
uk.fcast <- holt(uk.sa,36)
seasf <- sindexf(uk.stl,36)
uk.fcast$mean <- uk.fcast$mean + seasf
uk.fcast$lower <- uk.fcast$lower + cbind(seasf,seasf)
uk.fcast$upper <- uk.fcast$upper + cbind(seasf,seasf)
uk.fcast$x <- UKDriverDeaths
plot(uk.fcast,main="Forecasts from Holt's method with seasonal adjustment")

}
\author{
Rob J Hyndman
}
\keyword{ts}