Combine Matrix

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

fitria
Posts: 8
Joined: Thu Jul 14, 2011 7:20 pm

Combine Matrix

Postby fitria » Thu Aug 11, 2011 8:17 pm

Hello

i had a trouble for combining matrix, i have this program :

Code: Select all

load "D:\exp_matrix.xls"

for %var rand1 rand2
%dep = %var

equation eq_{%dep}.arch(1,1) {%dep} c ar(1) ar(2) ma(1)

!rsqadj = eq_{%dep}.@rbar2
!aic = eq_{%dep}.@aic
!sc = eq_{%dep}.@schwarz

matrix (1,3) crits_eq_{%dep}
crits_eq_{%dep} (1,1) = !rsqadj
crits_eq_{%dep} (1,2) = !aic
crits_eq_{%dep} (1,3) = !sc

matrix (2,3) crits_eq_all

next


i'm curious how to combine 2 matrix in the same matrix. above this, i want to combine matrix crits_eq_rand1 and crits_eq_rand1 in the same matrix, it is crits_eq_all, but how the way i make this happen?
thank you.

EViews Glenn
EViews Developer
Posts: 2671
Joined: Wed Oct 15, 2008 9:17 am

Re: Combine Matrix

Postby EViews Glenn » Fri Aug 12, 2011 10:52 am

Code: Select all

matplace(crits_eq_all, crits_eq_rand1, 1, 1)
matplace(crits_eq_all, crits_eq_rand2, 2, 1)

an easier way to do this is to create the CRITS_EQ_ALL at the beginning, and write everything to the !i row of the matrix when you are filling it. That way you don't have to combine things when you are done.

shineK
Posts: 24
Joined: Sat Jun 09, 2018 12:23 am
Location: New Taipei City,Taiwan
Contact:

Re: Combine Matrix

Postby shineK » Fri Jun 29, 2018 2:47 am

Hi there,

i have several matrix(more that 1000) with monthly frequency and need to combine to one, each matrix have 2 columns(c1 is monthly date, c2 is return), how to combine them all and with one monthly date?

i would like to turn matrix into group, but i can't use mtos because when i imported data i choosed dated regular frequency by daily...

Thank you so much!
Attachments
擷取.JPG
擷取.JPG (194.17 KiB) Viewed 3888 times
Best,
SK :D

EViews Matt
EViews Developer
Posts: 557
Joined: Thu Apr 25, 2013 7:48 pm

Re: Combine Matrix

Postby EViews Matt » Fri Jun 29, 2018 10:00 am

Hello,

Let's take a step back here. EViews can import your data into a monthly workfile. The trick is to indicate that the first column of data should be imported as characters, not a number. You'll then have the option to use that series as the date series for the workfile.

shineK
Posts: 24
Joined: Sat Jun 09, 2018 12:23 am
Location: New Taipei City,Taiwan
Contact:

Re: Combine Matrix

Postby shineK » Fri Jun 29, 2018 4:37 pm

Hi Matt,

Thank you. I have solved the problem!!! :D
Best,
SK :D


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 21 guests