That's quite easy, and pretty similar to most other common languages. Thanks very much.
On the basics, here's an example (hansl being gretl's scriptingOn Fri, 1 Feb 2013, Daniel Hanson wrote:
> I'm brand new to using Gretl, but have lots of experience with Stata, SAS,
> and R. I'm trying to use Gretl to do something pretty easy, but can't seem
> to make it do what I want.
>
> Basically, I have a person-year data file such that each observation
> consists of a person in a given year. I'd like to be able to plot summary
> statistics by year or person for a person-year data set.
>
> In other words, if my data file was:
>
> Person,Year,Height,Weight
> 1,1990,60,150
> 2,1990,62,160
> 1,1991,61,170
> 2,1991,63,180
>
> I'd like to plot Year on the X-axis and Height on the Y-axis, but plot the
> yearly average as a line (I.e., point A=(1990,61); point B=(1991,62)).
> With more extensive data, I'd like to add in lines for standard deviation,
> etc.
language):
<hansl>
series avgheight
loop i=1990..1991
smpl Year==i --restrict --replace
avgheight = mean(Height)
endloop
smpl --full
gnuplot avgheight Year --output=display
</hansl>
Allin Cottrell
_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users