Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • ttests for paired data with different number of trials in each pair

    Hello,

    I am trying to conduct a paired t-test on quasi-experimental data where matched (on sex, income, etc.) pairs of subjects who differ by race experience a different number of trials, meaning that individuals’ scores in each pair are the means across the varying numbers of trials. So the data look like:

    pair no. trials_1 trials_2 xbar_1 xbar_2

    1 15 10 4.0 2.0
    2 3 8 2.9 5.5

    etc.

    My thinking is that in testing for overall differences in means between group 1 and group 2 I would want to weight case 1 more than case 2. So basically I want to account for different within-pair and between-pair variances.

    Stata’s ttest command does not allow for aweights, and since I want to maintain the paired structure of the study, reshaping the data to long format and regressing xbar on a dummy variable for group 1 vs. group 2 with aweights is not a complete solution. Any suggestions?

    Thanks,
    Elaina

  • #2
    If you reshape your data to long, you can regress the variable of interest on the group distinction and also include the pair number (as a factor variable) as a term in the regression. That's completely equivalent to a paired ttest in the unweighted situation. And -regress-, of course, supports aweights.

    Comment


    • #3
      Originally posted by Clyde Schechter View Post
      If you reshape your data to long, you can regress the variable of interest on the group distinction and also include the pair number (as a factor variable) as a term in the regression. That's completely equivalent to a paired ttest in the unweighted situation. And -regress-, of course, supports aweights.
      Hi Clyde,

      Thank you for the help. It looks like that method is going to work!

      Comment

      Working...
      X