Learn R Programming

NHMSAR (version 1.4)

Mstep.classif:

Description

fit an AR model for each class of C by maximum likelihood method.

Usage

Mstep.classif(data, C, order)

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.
C
Class sequence
order
order of AR models (all models will have the same order)

Value

list containing
A0
intercept
A
AR coefficients
sigma
variance of innovation
LL
log likelihood

See Also

fit.MSAR

Examples

Run this code
	data(meteo.data)
data = array(meteo.data$temperature,c(31,41,1)) 
k = 40
T = dim(data)[1]
N.samples = dim(data)[2]
d = dim(data)[3]
order = 2
C = array(meteo.data>0,c(31,41,1))
res = Mstep.classif(data,C,order=order)
str(res)

Run the code above in your browser using DataLab