Learn R Programming

yuima (version 1.0.81)

setData: Set and access data of an object of type "yuima.data" or "yuima".

Description

setData constructs an object of yuima.data-class. get.zoo.data returns the content of the zoo.data slot of a yuima.data-class object. (Note: value is a list of zoo objects). plot plot method for object of yuima.data-class or yuima-class. dim returns the dim of the zoo.data slot of a yuima.data-class object. length returns the length of the time series in zoo.data slot of a yuima.data-class object. cbind.yuima bind yuima.data object.

Usage

setData(original.data, delta=NULL)
  get.zoo.data(x)

Arguments

original.data
some type of data, usually some sort of time series. The function always tries to convert to the input data into an object of zoo-type. See Details.
x
an object of type yuima.data-class or yuima-class.
delta
If there is the need to redefine on the fly the delta increment of the data to make it consistent to statistical theory. See Details.

Value

  • valuea list of object(s) of yuima.data-class for setData. The content of the zoo.data slot for get.zoo.data

Details

Objects in the yuima.data-class contain two slots: [object Object],[object Object] The function get.zoo.data returns the content of the slot zoo.data of x if x is of yuima.data-class or the content of x@data@zoo.data if x is of yuima-class.

Examples

Run this code
X <- ts(matrix(rnorm(200),100,2))
mydata <- setData(X)
str(get.zoo.data(mydata))
dim(mydata)
length(mydata)
plot(mydata)

# exactly the same output
mysde <- setYuima(data=setData(X))
str(get.zoo.data(mysde))
plot(mysde)
dim(mysde)
length(mysde)

# changing delta on the fly to 1/252
mysde2 <- setYuima(data=setData(X, delta=1/252))
str(get.zoo.data(mysde2))
plot(mysde2)
dim(mysde2)
length(mysde2)

Run the code above in your browser using DataLab