From cottrell@wfu.edu Tue Jun 29 10:03:21 2010 From: Allin Cottrell To: gretl-users@gretlml.univpm.it Subject: Re: [Gretl-users] Runnining individual regressions in a panel Date: Tue, 29 Jun 2010 10:02:48 -0400 Message-ID: In-Reply-To: 4C29F0DF.2030603@gmx.net MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6216212474501825584==" --===============6216212474501825584== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Tue, 29 Jun 2010, Sven Schreiber wrote: > Am 29.06.2010 10:46, schrieb Marcus Marktanner: > > Please apologize my ignorance, but I hope that someone can help me. I would > > like to classify a country as either one with some kind of a green > > revolution or not [...] > > Normally I would start by saying please start a new thread for a new > topic, but here by coincidence the solution is probably similar to the > one in the thread that you replied to. > > So something like: > > genr time > matrix greencountries = {} > numofunits = max($unit) > loop for i=1..numofunits > smpl $unit=i --restrict > smpl 1961 1980 # not sure if this works here [...] Sven's idea is fine, but that last "smpl" line will work only for time-series data. Let's suppose you have a variable called "year" in your data set which identifies the year. (If you don't already, you can easily construct one, e.g. "year = time + 1960"). Here's a tested version of Sven's idea which fakes what you want to do (as I understand it), using the panel dataset greene14_1.gdt that's supplied with gretl: Allin Cottrell --===============6216212474501825584==--