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

From |
René Geppert <geppert.rene@googlemail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: RE: ttest, signrank, ranksum with for each? |

Date |
Mon, 15 Dec 2008 15:56:55 +0100 |

Nick Cox schrieb:

The tests you mention are all based on an assumption of independent observations. Even though you are looking at differences, the question still remains whether that is consistent with your ideas about data generating process(es)?Nickn.j.cox@durham.ac.ukRené GeppertI have data for 2 groups. For the first group I have 6 quarters ofobservations, for the second group I have 2 quarters. 1. Q 2007 - 2. Q2008, and 1. Q 2008 - 2. Q 2008 respecively.Data are in long format, like this. Company - Year - Quarter - Variable1 - Group abc corp - 2007 - 1 - 0.4 - 1 abc corp - 2007 - 2 - 0.1 - 1 abc corp - 2007 - 3 - 0.05 - 1 abc corp - 2007 - 4 - 0.11 - 1 abc corp - 2008 - 1 - 0.70 - 1 abc corp - 2008 - 2 - 0.0 - 1 def corp - 2008 - 1 - 0.1 - 0 def corp - 2008 - 2 - 0.8 - 0 ghi corp...and so onI now want to perform difference in means and difference in medians testsfor 'Variable1' for both, changes from quarter to quarter within eachgroup (0 and 1) and differences among the groups within one quarter.Similarly, I want to test for difference in medians using signrank fordifferences within one group across quarters and within one quarteracross groups using ranksum.So: What I basically want to examine is, have there been any significantchanges in variable 1 between the quarters and between the groups?Because multiple observations exist for 'Quarter', I cannot simply do acommand like:. ttest Variable1, by(Group) cuz this captures all the quarters at once I tried nested if-criteria which doesn't work.So I presume this might be possible using a for each command, anyone gotan idea?* * 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/

* * 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: ttest, signrank, ranksum with for each?***From:*René Geppert <geppert.rene@googlemail.com>

**st: RE: ttest, signrank, ranksum with for each?***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**st: RE: ttest, signrank, ranksum with for each?** - Next by Date:
**Re: st: interpretation of interaction terms** - Previous by thread:
**st: RE: ttest, signrank, ranksum with for each?** - Index(es):

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