sample.likelihood_ratio.par(n = 500, rho = 0.8, sigma_M = 1, sigma_R = 1,
nrep = 1000, use.multicore = TRUE, robust = FALSE,
nu = par.nu.default(), seed.start = 0)
TRUE
, then the parallel
package is
used to speed up processing.TRUE
, then sequences containing t-distributed errors are
generated, and robust fits are performed. Possibly a vector.robust
is TRUE
, then this is the degrees-of-freedom
parameter to be used. Possibly a vector.data.frame
with the following columnsrho
that was used for generating the sequencesigma_M
that was used for generating the sequencesigma_R
that was used for generating the sequencerho
estimated using the pure random walk model (always 0)sigma_M
estimated using the pure random walk model (always 0)sigma_R
estimated using the pure random walk modelrho
estimated using the pure mean-reversion modelsigma_M
estimated using the pure mean-reversion modelsigma_R
estimated using the pure mean-reversion model (always 0)rho
estimated using the PAR modelsigma_M
estimated using the PAR modelsigma_R
estimated using the PAR modelur.kpss
)kpss_stat
fit.par
function by generating random partially autoregressive sequences
and determining the maximum likelihood fits to them. For each combination of
parameter values given by n
, rho
, sigma_M
, sigma_R
,
robust
and nu
, generates nrep
random partially autoregressive
sequences with these parameters. Then, uses fit.par
to fit the sequence
using the partially autoregressive model, the pure random walk model and the
pure mean reversion model. Returns a data.frame
containing the results
of the fits.fit.par
sample.likelihood_ratio.par(500, c(0.5,0.75), 1, c(1,2),nrep=3)
Run the code above in your browser using DataCamp Workspace