On Mon, 19 Oct 2009, [iso-8859-1] Ricardo Gon�alves Silva wrote:
I need to do a scatter plot by two groups (like time and
individual, in a panel data).
I have continuous data and 4 classes for each grouping variable
(16 combinations).
Can Gretl does this?
Sorry this has taken a while.
If I have the right idea of what it is you want to do, you can do
a sequence of scatter plots using a loop and the "smpl" command.
Suppose we have variables of interest y and x, and a group
variable "byvar", and we want a scatter of y versus x for each
value of byvar:
matrix byvals = sort(values(byvar))
scalar nvals = rows(byvals)
loop i=1..nvals
smpl byvar=byvals[i] --restrict
gnuplot y x
smpl --full
endloop
The same idea can be extended to the case of two grouping
variables, with an inner loop pertaining to (say) "byvar2".
matrix byvals = sort(values(byvar))
scalar n = rows(byvals)
matrix byvals2 = sort(values(byvar2))
scalar m = rows(byvals2)
loop i=1..n
loop j=1..m
smpl byvar=byvals[i] && byvar2=byvals2[j] --restrict
gnuplot y x
smpl --full
endloop
endloop
Allin Cottrell