setData | R Documentation |
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.
setData(original.data, delta=NULL, t0=0) get.zoo.data(x)
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
|
x |
an object of type |
delta |
If there is the need to redefine on the fly the |
t0 |
the time origin for the internal |
Objects in the yuima.data-class
contain two slots:
original.data
:The slot original.data
contains, as the
name suggests, a copy of the original data passed to the function
setData
. It is intended for backup purposes.
zoo.data
:the function setData
tries to convert
original.data
into an object of class zoo
. The
coerced zoo
data are stored in the slot zoo.data
.
If the conversion fails the function exits with an error.
Internally, the yuima package stores and operates on
zoo
-type objects.
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
.
value |
a list of object(s) of |
The YUIMA Project Team
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) # changing delta on the fly to 1/252 and shifting time to t0=1 mysde2 <- setYuima(data=setData(X, delta=1/252, t0=1)) str(get.zoo.data(mysde2)) plot(mysde2) dim(mysde2) length(mysde2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.