Page 1 of 1

unstacking only one country

Posted: Sat Nov 07, 2020 4:58 am
by dsdsdsdsd
hello ...

my goal is to use only a single country, out of a panel data set, for the purpose of a single-country time series ...

I start with an excel file:
COUNTRY | VARIABLE | YR1980 | yr1981 | YR1982
---------------------------------------------------------------
japan | gdp | 111 | 112 | 113
france| gdp | 211 | 212 | 213
brazil | gdp | 311 | 312 | 313
japan | cpi | 121 | 122 | 123
france| cpi | 221 | 222 | 223
brazil | cpi | 321 | 322 | 323

I have imported it into a page, then stacked it ... of course it contains all the data ...

so now I want to unstack it ... but I would like to tell it to only pull out, say, "brazil" ...

and once it pulls out "brazil" data, the "brazil" identifier should no longer exist, as the final destination is time series ...

Is there a way to do this??

(alternative: only import "brazil" in the first place)

- thanks, Shannon

Re: unstacking only one country

Posted: Sat Nov 07, 2020 8:00 am
by startz
Perhaps just

Code: Select all

smpl if country = "brazil"

Re: unstacking only one country

Posted: Sat Nov 07, 2020 9:41 am
by dsdsdsdsd
hello ... thanks for responding ...

where would I include

Code: Select all

smpl if country = "brazil"
?

I am using the Proc/Reshape Current Page/Stack (Unstack) in New Page way of doing it ... but I do not think that I can add a command in the available forms ...

screenshot_eviews_11_07_20.png
screenshot_eviews_11_07_20.png (66.96 KiB) Viewed 15623 times

screenshot_eviews_11_07_20_02.png
screenshot_eviews_11_07_20_02.png (82.12 KiB) Viewed 15623 times

screenshot_eviews_11_07_20_03.png
screenshot_eviews_11_07_20_03.png (80.49 KiB) Viewed 15623 times

Re: unstacking only one country

Posted: Sat Nov 07, 2020 9:45 am
by startz
Try Proc/Contract the current page to have Brazil only. Then you can do Proc/Restructure if you like.

Re: unstacking only one country

Posted: Sat Nov 07, 2020 9:55 am
by dsdsdsdsd
that worked ...

I easily spent 3+ hours working trying to figure a way to do that last night ...

thank you