Hey everybody,
I've got a panel data set including data for several countries over time. In a first stage I run a RE-estimation based on the full sample. Next I want to estimate the same model for a single country by restricting the data:
<hansl>
smpl country="UK" --restrict --replace
panel Y const X --random-effects
<\hansl>
But gretl states "This estimator requires panel data". Instead, this works:
<hansl>
smpl country="UK" --restrict --replace
setobs ID year --panel-vars
panel Y const X --random-effects
<\hansl>
Fine so far. Since I want to add all country-specific estimations (for several dependent variables) into a single table (modeltab), I include the code into a loop function, but unfortunately the "setbobs"-command does not work within a loop environment.
Does anyone have a solution to solve this issue, or would it be possible to allow the "setobs"-command to work within a loop-function?
Cheers,
Artur