select.fdata: Subscript of fdata

View source: R/fdata.R

select.fdataR Documentation

Subscript of fdata

Description

Use this function to subscript some functional observations of a functional data.

Usage

select.fdata(data, date, name)

Arguments

data

A fdata object.

date

A vector of character containing the chosen dates (could be NULL).

name

A vector giving the chosen name (could be NULL).

Details

This function select one or several variables from data and can also subset the dates. This is useful in order to study the endogenous variables of a FARX process.

Value

A fdata object.

Author(s)

J. Damon

See Also

fdata

Examples

  # Simulation of a FARX process
  data1 <- simul.farx(m=10,n=400,base=base.simul.far(20,5),
                base.exo=base.simul.far(20,5),
                d.a=matrix(c(0.5,0),nrow=1,ncol=2),
                alpha.conj=matrix(c(0.2,0),nrow=1,ncol=2),
                d.rho=diag(c(0.45,0.90,0.34,0.45)),
                alpha=diag(c(0.5,0.23,0.018)),
                d.rho.exo=diag(c(0.45,0.90,0.34,0.45)),
                cst1=0.0)

  print(data1)
  print(data1.X <- select.fdata(data1,name="X"))
  print(data2 <- select.fdata(data1,date=paste((1:5)*5)))
  date.fdata(data2)

Looping027/far documentation built on Aug. 15, 2022, 7:15 a.m.