Learn R Programming

NHMSAR (version 1.0)

Estep.MSAR: Estep of the EM algorithm for fitting (non) homogeneous Markov switching auto-regressive models.

Description

Forward-backward algorithm called in fit.MSAR.

Usage

Estep.MSAR(data, theta, smth = FALSE, 
           verbose = FALSE, 
           covar.emis = covar.emis, covar.trans = covar.trans)

Arguments

data
array of univariate or multivariate series with dimension T*N.samples*d. T: number of time steps of each sample, N.samples: number of realisations of the same stationary process, d: dimension.
theta
model's parameter; object of class MSAR. See also init.theta.MSAR. .
smth
If smth=FALSE, only the forward step is computed for forecasting probabilities. If smth=TRUE, the smoothing probabilities are computed too.
verbose
if verbose=TRUE some results are printed at each iteration.
covar.emis
covariables for emission probabilities.
covar.trans
covariables for transition probabilities.

Value

  • A list including
  • logliklog likelihood
  • probSsmoothing probabilities: $P(S_t=s|y_0,\cdots,y_T)$
  • probSSone step smoothing probabilities: $P(S_t=s,S_{t+1}|y_0,\cdots,y_T)$

References

Ailliot P., Monbet V., (2012), Markov switching autoregressive models for wind time series. Environmental Modelling & Software, 30, pp 92-101.

See Also

fit.MSAR, Mstep.hh.MSAR

Examples

Run this code
#see fit.MSAR}

<keyword>EM algorithm</keyword>
<keyword>E step</keyword>
<keyword>Forward-backward</keyword>

Run the code above in your browser using DataLab