armaErr | R Documentation |
armaErr
class generator using arima.sim
armaErr
class generator using arima.sim
armaErr
class generator using arima.sim
PersonAlyticsPower::err
-> errARMA
model
The parameters for FUN
.
errVar
The error variance.
FUN
The function for simulating error terms.
fam
A gamlss.family
family for the error term distribution.
After data are simulated using FUN
and its model
, it can be
transformed to have a distribution different from those available to FUN
.
famParms
Parameters to be passed to fam
, see gamlss.family
.
model
The parameters for FUN
.
errVar
The error variance.
FUN
The function for simulating error terms.
fam
A gamlss.family
family for the error term distribution.
After data are simulated using FUN
and its model
, it can be
transformed to have a distribution different from those available to FUN
.
famParms
Parameters to be passed to fam
, see gamlss.family
.
new()
armaErr$new( model = list(ar = c(0.5), ma = c(0)), fam = "NO", famParms = list(mu = 0, sigma = 1) )
checkModel()
armaErr$checkModel( seed = 1234, n = 1000, doPlot = TRUE, doStats = TRUE, debug = FALSE )
makeErrors()
armaErr$makeErrors(n, nObservations, seed = 123, debug = FALSE)
clone()
The objects of this class are cloneable with this method.
armaErr$clone(deep = FALSE)
deep
Whether to make a deep clone.
Stephen Tueller stueller@rti.org
# set up a stationary arma model
testErr <- armaErr$new(model = list(ar=c(.5), ma=c(.2)))
testErr$checkModel()
# show testing for an unstationary ARMA model
testFail <- armaErr$new(model = list(ar=c(-.8, .5), ma=c(.2)))
testFail$checkModel()
# show that r* functions from gamlss.family distribution functions can be
# passed to arima.sim
errBeta <- arima.sim(list(ar=c(.5)), 1000, innov = rBE(1000, mu=.5, sigma=.2))
# note that the rand.gen option only allows the defaults for the function
# passed to rand.gen
#errBeta <- arima.sim(list(ar=c(.5)), 1000, rand.gen = rBE)
# that said, rand.gen's parameters can be passed via ...
#errBeta <- arima.sim(list(ar=c(.5)), 1000, rand.gen = rBE, mu=.9, sigma=.2)
# note that even though beta innovations are used, the resulting data is not
# constrained to be in (0,1)
hist(errBeta)
plot(errBeta)
auto.arima(ts(errBeta))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.