fds: Create functional objects

Description Usage Arguments Value Author(s) Examples

Description

The function fds is used to create general independent and identically distributed (i.i.d.) functional objects that are not ordered by time. The function fts is used to create functional time series objects. The function sfts is used to create sliced functional time series objects, where the x variable is also a time variable.

Usage

1
2
3
4
fds(x, y, xname, yname)
fts(x, y, start = 1, frequency = 1, xname, yname)
sfts(data, period = frequency(data), start = tsp(data)[1], 
     frequency = 1, xname, yname)

Arguments

x

Numeric vector of length p.

y

Matrix of size p x n representing n functions of x observed at points 1,...,p.

data

An object of class ts.

period

Time period of sliced functional data. For instance, period = 12 is a monthly data.

start

The time of the first observation. Either a single number or a vector of two integers, which specify a natural time unit and a (1-based) number of samples into the time unit. See ts for details.

frequency

The number of observations per unit of time.

xname

Character string giving name of x vector. (optional)

yname

Character string giving name of y vector. (optional)

Value

An object of class fds or fts or sfts.

Author(s)

Rob J Hyndman and Han Lin Shang

Examples

1
2
3
4
5
fds(x = 1:20, y = Simulationdata$y, xname = "x", yname = "Simulated value")
fts(x = 15:49, y = Australiasmoothfertility$y, xname = "Age", 
    yname = "Fertility rate")
sfts(ts(as.numeric(ElNino_OISST_region_1and2$y), frequency = 12), xname = "Month", 
     yname = "Sea surface temperature")    

Example output

Loading required package: MASS
Loading required package: pcaPP
Functional data set
 y: Simulated value
 x: x 
Functional time series
 y: Fertility rate
 x: Age 
Sliced functional time series
 y: Sea surface temperature
 x: Month 

rainbow documentation built on May 2, 2019, 3:30 p.m.