[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

To |
"Nick Cox" <n.j.cox@durham.ac.uk>, <statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: Foreach Loop with anovaplot |

Date |
Thu, 1 Oct 2009 19:26:46 +0100 |

An extra comment is that by suppressing the data -- ms(none)- -- you are losing much of the potential value of the plot. Regression people who leave the data off a scatter plot showing a regression line are usually regarded as missing the plot (so to speak). Why are ANOVA people allowed to get away with it? Nick n.j.cox@durham.ac.uk -----Original Message----- From: Nick Cox Sent: 01 October 2009 18:31 To: 'statalist@hsphsun2.harvard.edu' Subject: RE: Foreach Loop with anovaplot -anovaplot- is a user-written command from SJ 4-4. Please remember to say, as requested in the FAQ, whenever you are using a user-written command and where it comes from. The error message indicates what the help for -anovaplot- explains: "With the second syntax [that used here: NJC], a varlist is supplied, which must be a permutation of the predictors previously used." So, the short answer is: Make sure your call to -anovaplot- is legal. I don't know, however, why you are using this second syntax at all. As your loop is over anova <something> exam_nb clinic a call to -anovaplot- without specifying any variables at all would seem to be what you want, i.e. -anovaplot-'s first syntax. Nick n.j.cox@durham.ac.uk Diego Bellavia I am trying to build a simple script to loop into some ANOVA for repeated measures tests and graph them with anovaplot. The script is the following: #delimit ; foreach X of varlist age blood_p cholesterol... {; anova `X' exam_nb clinic, repeated(exam_nb); anovaplot exam_nb, scatter(msym(none)); }; #delimit cr Where of course clinic is the ID of the subject, and exam_nb the ID of the single observation. When I run it as a command everything works fine but as soon as I put this in a .do file, I see the following message: "exam_nb not a permutation of exam_nb clinic" that makes sense to me but when I try to add clinic in the anovaplot command I get some weird graph I cannot understand... * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: Foreach Loop with anovaplot***From:*Diego Bellavia <bellavia.diego@mac.com>

**st: RE: Foreach Loop with anovaplot***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**st: RE: Linking legend text to the value of a variable** - Next by Date:
**Re: st: mi estimate and xtmixed: reporting of groups** - Previous by thread:
**st: RE: Foreach Loop with anovaplot** - Next by thread:
**st: question: getting GMM working with a moment-evaluator program** - Index(es):

© Copyright 1996–2016 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |