about sample

For questions regarding programming in the EViews programming language.

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

eviewsnew
Posts: 22
Joined: Fri Apr 22, 2011 2:58 pm

about sample

Postby eviewsnew » Wed Jun 08, 2011 3:08 pm

I import a panel data with 1000 rows and 3 collumns, for 10 regions each having 100 data points along time. The three collumns are: region, time (quarterly pattern), and x (econ data).

1. i used code wfopen to get the data in . How does eviews detect which one is the time indicator for my series? actually when I open each series, i see a combination of region_time at the very left in vague collumn.

2. if i want to create a new series with only 100 data points but not 1000 data points having all the previous100 time points for each region (quarterly), how do I do the sample?

this one below doesn't work.

smpl 1986Q1 2011Q1
series x


when I open the x, it has still the 1000 rows as in the big workfile.

confused. is it that the coding in Eviews in not preferred over the drag and click pattern?

thanks!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: about sample

Postby EViews Gareth » Wed Jun 08, 2011 3:24 pm

I assume you've already read the guides on this forum with regards to Panel data.

EViews basically scans your columns and works out which, if any, look like dates, and which, if any, look like cross-section IDs, and then automatically structures the workfile based on that detection. It sounds like in your case it did a good job of detecting the dates and the cross-sections, and so built the panel correctly.


All series have to be the same length - i.e. the length of the workfile. You cannot create a series with only 100 observations if the workfile has 1,000 observations.

However you can tell EViews to only use 100 observations. That's what you do when you set the sample. This is true whether you're using the mouse or using the command language.

eviewsnew
Posts: 22
Joined: Fri Apr 22, 2011 2:58 pm

Re: about sample

Postby eviewsnew » Wed Jun 08, 2011 3:54 pm

Very clear. thanks!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests