## 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

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 = %varequation eq_{%dep}.arch(1,1) {%dep} c ar(1) ar(2) ma(1)!rsqadj = eq_{%dep}.@rbar2!aic = eq_{%dep}.@aic!sc = eq_{%dep}.@schwarzmatrix (1,3) crits_eq_{%dep}crits_eq_{%dep} (1,1) = !rsqadjcrits_eq_{%dep} (1,2) = !aiccrits_eq_{%dep} (1,3) = !scmatrix (2,3) crits_eq_allnext`

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: 2600
Joined: Wed Oct 15, 2008 9:17 am

### Re: Combine Matrix

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

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

Best,
SK

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

### Re: Combine Matrix

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

Hi Matt,

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