Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Lars Folkestad <lfolkestad@health.sdu.dk> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: Paired t-test for propensity match cohort |
Date | Sun, 17 Jul 2011 18:06:54 +0200 |
If you sort group and age and use the stable option you can reshape your data using the reshape wide option The stable option is critical. Tjeck you data one million times when you have reshaped your data, so that pair 1 is a line. (there is a funktion in Stata that can do the checking for you, but cannot remember the name of it.) Then do ttest varex1 == varex2 Hope it helps, and that i havent misunderstood your problem. Mvh Lars Folkestad Den 17/07/2011 kl. 17.26 skrev "Sripal Kumar" <sripalkumar@gmail.com>: > Dear all, > > There should be a simple solution to the problem below but I cant seem > to wrap my head around it. I have a propensity matched cohort that is > arranged as > > Pairs matching_Variable Age > 1 0 53 > 1 1 54 > 2 0 55 > 2 1 52 > 3 0 55 > 3 1 52 > 4 0 53 > 4 1 54 > 5 0 55 > 5 1 52 > > How can I do a paired sample t-test for age without having to create > two other variables age_0 and age_1. > thanks in advance. > Sripal. > > * > * 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/