On Wed, 10 Mar 2010, [iso-8859-1] Peter Blömeke wrote:
Ok, regressions are working perfectly now but gretl prints out a
complete regression-output for each model and stops at i = 16
instead of 612.
Here's a tested example of doing the sort of thing you want,
as interpreted by Sven. I'm using one of the panel datasets
supplied with gretl which has 6 cross-sectional units. The script
runs two regressions for each unit and stores the slope
coefficients, producing a 6 x 2 matrix once all is done.
<script>
open greene14_1.gdt
logs C Q PF
scalar numofunits = max($unit)
matrix betas = {}
loop for i=1..numofunits
smpl $unit=i --restrict
ols l_C 0 l_Q --quiet
b1 = $coeff[2]
ols l_C 0 l_PF --quiet
b2 = $coeff[2]
betas |= { b1, b2 }
smpl full
endloop
print betas
</script>
Allin Cottrell