recursively calculated variace covariance matrix

3 visualizaciones (últimos 30 días)
gsourop
gsourop el 4 de Nov. de 2016
Editada: Matt J el 4 de Nov. de 2016
Hi all,
I have the following question: I need to calculate for every time t the following equation:
w_t=c*inv(VCV_(t+1))*(m_(t+1)-i_t)
where c is a constant, the variance covariance matrix should be iteratively computed for every time t, m_t is a 6x1 vector and i_t is also a 6x1 vector. I've tried the following but I get an error
for t=1:432;
VCV(t)=(x(t,1:6)-y(t,:))*(x(t,1:6)-y(t,:))';
end;
where x and y are 432x6 matrices I am supposed to get 432 6x6 VCV matrices. So I can put them in the first equation. Would it be more correct if I calculated the first equation like this:
for t=1:432;
w(t) = c* inv((x(t,1:6)-y(t,:)) * (x(t,1:6)-y(t,:))') * (m(t+1)-i(t)) ;
end;
Thank you very much in advance

Respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by