Page 1 of 1

is there "matplace" for tables??

Posted: Thu May 05, 2011 12:51 pm
by basil
1. "matplace" allows you to to update parts of a matrix with another matrix. Is there a similar function that will work on tables?
2. Is there a function (or a way) to merge two sub-tables, something like table1[(1,2);5,2) attached to table2[(1,5);5,5), so to get the first two columns of table1 and first 5 columns for table2 joined together?

I would like to loop over different sub-samples, run a regression, and update the estimated coefficients in the matrix. However, I do not know how many iteration I will have nor do I know how many variables there will be, therefore, I do not know the dimensions of the matrix, which needs to be known at the time you declare the matrix. The nice thing about table is that you do not have to define the the dimensions upfront. Also, table allows strings (I need to name each row) while a matrix accepts only numbers.

Re: is there "matplace" for tables??

Posted: Thu May 05, 2011 1:14 pm
by EViews Gareth
table.copyrange or table.copytable.

Re: is there "matplace" for tables??

Posted: Thu May 05, 2011 1:36 pm
by basil
Again, thanks for your help. I could not see this command in the guide. Could you explain with one simple example how to use it? Much appreciated.

Best,
Basile

Re: is there "matplace" for tables??

Posted: Thu May 05, 2011 1:50 pm
by EViews Gareth
From the manual:

Code: Select all

Examples table1.copytable table2 A10 copies all of the data in TABLE1 to the 1st column and 10th row of TABLE2. table1.copytable table2 1 5 copies all of the data in TABLE1 to the 5th column and first row of TABLE2.

Code: Select all

Examples table1.copyrange B2 D4 table2 A1 places a copy of the data from cell range B2 to D4 in TABLE1 to TABLE2 at cell A1 table1.copyrange 1 1 1 5 table2 1 3 copies 5 rows of data in the first column of data in table1 to the top of the 3rd column of TABLE2.

Re: is there "matplace" for tables??

Posted: Thu May 05, 2011 2:57 pm
by EViews Jason
Similarly you could also use tabplace.

From the manual:

Code: Select all

Examples tabplace(table2,table1,"d1","B9","E17") places a copy of the data from cell range B9 to E17 in TABLE1 to TABLE2 at cell D1 tabplace(table3,table1,10,3,9,2,17,5) copies 8 rows of data (from row 9 to row 17) and 3 columns (from 2 to 5)of data in TABLE1 to the tenth row and 3rd column of TABLE3.

Re: is there "matplace" for tables??

Posted: Fri May 06, 2011 7:26 am
by basil
Thanks for trying to help.

I could not find these in my manual. Are these new to EViews 7? Mine is EViews 6 and I could have these commands work:
"copyrange" is not a defined or is an illegal command
"matplace" works only for matrices, and when trying your example, it creates an error msg "too many arguments".


Any suggestion?

Thanks,
Basile

Re: is there "matplace" for tables??

Posted: Fri May 06, 2011 7:53 am
by EViews Gareth
They're all EV7 based. You're out of luck in EV6.

Re: is there "matplace" for tables??

Posted: Fri May 06, 2011 8:58 am
by basil
thanks.

Re: is there "matplace" for tables??

Posted: Fri May 06, 2011 8:58 am
by basil
thanks.