Hello all,
First of all: thank you Allin! It works perfectly, exactly that I was
thinking of. I can even edit the plot gretl-stlye after running the
script, very nice. (And I'm also a bit relieved that not I was missing
a GUI feature for this...) By the way, I really appreciate the way you
help everyone on this list, thank you again!
Just out of curiosity: what is the rationale behind limiting the GUI
to binary variables? Enabling the usage of any discrete variable
would in no way alter the possibility of still using a binary variable
(it would be a fully "backward compatible" change, so to say), and it
also doesn't seem to be too complicated...
Tamás
2011. április 26., 1:39:48, írtad:
On Sat, 23 Apr 2011, Ferenci Tamas wrote:
> I was just wondering: is it somehow possible to create a scatter
plot
> where markers depend on a categorical (but not dummy, i.e. not binary)
> variable? View / Graph specified vars / X-Y with factor separation
> looked promising, but it only allows dummy variables as separating
> factors, so the points can only be partitioned into two sets. Is it
> somehow possible to extend this to more than two...?
It's not a built-in command, but it's not very difficult.
Suppose
you have a "treatment" variable x and a "response" variable y, and
you want to plot y against x, with the points distinguished by the
associated value of some discrete variable d. Then:
<script>
matrix dvals = values(d)
nd = rows(dvals)
list yd = null
loop i=1..nd
series y$i = (d == dvals[i]) ? y : NA
yd = yd y$i
endloop
gnuplot yd x --output=display # or whatever option
</script>
Allin Cottrell
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
__________ ESET Smart Security - Vírusdefiníciós adatbázis: 6071
(20110426) __________
Az üzenetet az ESET Smart Security ellenőrizte.