setSampling is a constructor for yuima.sampling-class.setSampling(Initial = 0, Terminal = 1, n = 100, delta,
grid, random = FALSE, sdelta=as.numeric(NULL),
sgrid=as.numeric(NULL), interpolation="pt" )yuima.sampling-class.yuima.sampling-class with several slots.
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
In case of subsampling, the observations are subsampled on some given
grid/sgrid or according to some random times. When
the original observations do not exist at a give point of the grid they are
obtained by some approximation method. Available methods are "pt" or
"previous tick" observation method, "nt" or "next tick"
observation method, or by l"linear" interpolation.
In case of interpolation, the slot oindex contains the vector of indexes
corresponding to the original observations used for the approximation. For the
linear method the index corresponds to the left-most observation.
The slot random is used as information in case a grid is
already determined (e.g. n or delta, etc. ot the grid
itself are given) or if some subsampling has occurred or if some particular
method which causes a random grid is used in simulation (for example the
space discretized Euler scheme). The slot random contains a list
of two elements distr and scale, where distr is a
the distribution of independent random times and scale is either a
scaling constant or a scaling function.
If the grid of times is deterministic, then random is FALSE.
If not specified and random=FALSE, the slot grid is filled
automatically by the function. It is eventually modified or created
after the call to the function simulate.
If delta is not specified, it is calculated as (Terminal-Initial)/n).
If delta is specified, the Terminal is adjusted to be equal to
Initial+n*delta.
The vectors delta, n, Initial and Terminal may
have different lengths, but then they are extended to the maximal length to
keep consistency. See examples.
If grid is specified, it takes precedence over all other arguments.samp <- setSampling(Terminal=1, n=1000)
str(samp)
samp <- setSampling(Terminal=1, n=1000, delta=0.3)
str(samp)
samp <- setSampling(Terminal=1, n=1000, delta=c(0.1,0.3))
str(samp)
samp <- setSampling(Terminal=1:3, n=1000)
str(samp)Run the code above in your browser using DataLab