genMineData {dse2} | R Documentation

## Generate Data

### Description

Generate data for Monte Carlo experiments

### Usage

        genMineData(umodel, ymodel, uinput=NULL, sampleT=100,
          unoise=NULL, usd=1,ynoise=NULL, ysd=1, rng=NULL)
        build.input.models(all.data, max.lag=NULL)
        build.diagonal.model(multi.models)

### Arguments

`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` |
`all.data` |
`max.lag` |
`uinput` |

### Details

This function generates test data using specified models. umodel is used to generate data input data and ymodel is used to generate data corresponding 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 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 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 models, one for each series in `inputData(data)` and `build.diagonal.model` which builds one diagonal model from a list of models returned by `build.input.models`. It uses the AR part only.

### Value

A TSdata object.

### See Also

`simulate`

### Examples

        if(is.R()) data("eg1.DSE.data.diff", package="dse1")
        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)

[Package Contents]