Description Usage Arguments Details Value See Also Examples
Generate data for Monte Carlo experiments
1 2 3 4 | genMineData(umodel, ymodel, uinput=NULL, sampleT=100,
unoise=NULL, usd=1,ynoise=NULL, ysd=1, rng=NULL)
build.input.models(data, max.lag=NULL)
build.diagonal.model(multi.models)
|
umodel |
Model for input data. |
ymodel |
Model for output data. |
sampleT |
Number of periods of data to generate. |
unoise |
Input noise. |
usd |
Standard deviationof input noise. |
ynoise |
Output noise. |
ysd |
Standard deviation of output noise. |
rng |
RNG setting. |
multi.models |
A list of |
data |
data from which to build models. |
max.lag |
number of lags in the estimated models. |
uinput |
Input data to |
This function generates test data using specified models.
umodel
is used to generate data corresponding to input data and
ymodel
is used to generate data corresponding to output data.
The result of umodel
is used as input to ymodel
so the
input dimension of ymodel
should be the output dimension of
umodel
. Typically the ymodel
would be degenerate
in some of the input variables so the effective inputs are a subset.
If umodel
requires input data it should be specified in uinput
If noise
is NULL
then an normal noise will be generated
by simulate
.
This will be iid N(0,I).
The RNG will be set first to rng
if it is specified.
If unoise
or ynoise
are specified they should be as
expected by simulate
for the specified umodel
and ymodel
.
genMineData
uses build.input.models
, which makes a list of
univariate TSestModel
s, one for each series in inputData(data)
estimated by estVARXls
with max.lag
lags.
genMineData
then uses
build.diagonal.model
which builds one diagonal model from a list
of models returned by build.input.models
. It uses the AR part only.
A TSdata object.
1 2 3 4 5 6 7 | data("eg1.DSE.data.diff", package="dse")
umodel <- build.diagonal.model(
build.input.models(eg1.DSE.data.diff, max.lag=2))
z <- TSdata(output=outputData(eg1.DSE.data.diff),
input = inputData(eg1.DSE.data.diff))
ymodel <- TSmodel(estVARXls(z, max.lag=3))
sim.data <- genMineData(umodel, ymodel)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.