Dear all,
I am hoping that some of you may be able to tell me how to solve the following problem:
Background: In my dataset of about 100 individuals we have measured a number of variables at two different occasions. Each individual therefore has two sets of data, i.e. two lines of data, like this:
Question/Problem: I’d like to compare the paired values (using either paired t-test or Wilcoxon signed rank test) measured at two different occasions, but the values of var1time1 and var1time2 are located at different lines (so e.g. "signrank var1time1=var1time2" doesn't make sense). How do I make Stata "understand" that var1time1 is to be compared to var1time2 given identical id? (It is not an alternative to merge the lines as most variables are set up as var2 shown above)
Thanks in advance!
I am hoping that some of you may be able to tell me how to solve the following problem:
Background: In my dataset of about 100 individuals we have measured a number of variables at two different occasions. Each individual therefore has two sets of data, i.e. two lines of data, like this:
| id | time | var1time1 | var1time2 | var2 |
| 13 | 1 | 10 | . | 1 |
| 13 | 2 | . | 11 | 2 |
| 14 | 1 | 24 | . | 4 |
| 14 | 2 | . | 22 | 3 |
| 15 | 1 | 7 | . | 2 |
| 15 | 2 | . | 8 | 5 |
Question/Problem: I’d like to compare the paired values (using either paired t-test or Wilcoxon signed rank test) measured at two different occasions, but the values of var1time1 and var1time2 are located at different lines (so e.g. "signrank var1time1=var1time2" doesn't make sense). How do I make Stata "understand" that var1time1 is to be compared to var1time2 given identical id? (It is not an alternative to merge the lines as most variables are set up as var2 shown above)
Thanks in advance!

Comment