mixARExperiment: Simulation experiments with MixAR models

View source: R/mixARsim.R

mixARExperimentR Documentation

Simulation experiments with MixAR models

Description

Perform simulation experiments with MixAR models.

Usage

mixARExperiment(model, imodel = NULL, simargs = NULL, estargs = NULL, fix, ...)

Arguments

model

the underlying model, an object inheriting from "MixAR", see 'Details'.

imodel

initial model, an object inheriting from "MixAR", see 'Details'.

simargs

additional arguments for the simulation function, a list, see 'Details'.

estargs

additional arguments for the estimation function, a list, see 'Details'.

fix

which arguments to keep fixed during estimation; currently if fix = "shift" the shift parameters are kept fixed, otherwise all parameters are estimated.

...

additional arguments to pass on to simuExperiment.

Details

mixARExperiment is a wrapper for simuExperiment.

The simulation function is mixARsim and the estimation function is fit_mixAR. The simulation function gets model as first argument. The first argument of the estimation function is imodel, if supplied, or model otherwise. Some appropriate defaults for other arguments are also supplied. Arguments simargs and estargs are needed only to override defaults.

If fix = "shift", the shifts components are not estimated and are kept fixed. This may be useful when fitting the model to differenced series, for example.

mixARExperiment sets keep and summary_fun to some defaults (currently mixAR:::.fsumA for the latter).

Value

A list with one or more elements, depending on the arguments ... passed on to simuExperiment.

Summary

a summary of the experiment, by default sample means and standard deviations of the estimates. This is a list of MixAR models.

Raw

A list of the estimated models.

Note

This is an initial version of this function, some of its arguments may change. Additional elements may be made available in the returned value, so refer to those by name, not with a numeric index.

Author(s)

Georgi N. Boshnakov

See Also

simuExperiment

Examples

exampleModels$WL_II

set.seed(1234)
n = 20 # toy size
N = 5 # toy number of simulations
mixARExperiment(exampleModels$WL_II, N = N, estargs = list(crit = 1e-4))
mixARExperiment(exampleModels$WL_II, N = N, raw = TRUE, estargs = list(crit = 1e-4))
mixARExperiment(exampleModels$WL_II, N = N, raw = TRUE,
    simargs = list(n = n), estargs = list(crit = 1e-4) )

GeoBosh/mixAR documentation built on May 9, 2022, 7:36 a.m.