Page 1 of 1

Copy values from cross-section to entire vector

Posted: Fri Jun 01, 2018 3:55 am
by stefanp
I use a panel data set. I need to copy some value from cross-section AA to another cross-section AB, but not to any other cross-sections.

So far, I create an auxiliary series TEMP, copy the value from AA to TEMP. However, when I want to copy TEMP to AB it does not work as for the corresponding sample (AB), the series TEMP contains only NAs.

Re: Copy values from cross-section to entire vector

Posted: Fri Jun 01, 2018 4:24 pm
by EViews Glenn
Can you be a bit more specific about what you are doing? What values in AA need to be copied? Is it the value for one date, or values for a range of dates? Are we matching up observations by-date?

Re: Copy values from cross-section to entire vector

Posted: Mon Jun 04, 2018 2:26 am
by stefanp
I have created a workfile and a codefile which does the required task. However, I assume this approach is way too complicated for what I require.

Re: Copy values from cross-section to entire vector

Posted: Mon Jun 04, 2018 6:27 pm
by EViews Glenn

Code: Select all

series var2a = @meansby(var2, country, date)