Hallo
Apologies for not using dataex. I have tried and failed to install it (I used ssc install dataex but it gave me an error). I am hoping I can explain sufficiently here.
I have done a paired t-test to test the significance of differences between variables that have been gathered as never/often/rarely/sometimes. One variable is pre-intervention, one variable is post-intervention. I want to see whether there is a difference between the reporting for how often something happened from pre to post.
1. I first coded them so that never = 1, rarely = 2, sometimes = 3 and often = 4 (ie higher numbers equated to "more often"), and encoded the string variables to numeric.
tab pre_mor_del_lifen
Delayed | Freq. Percent Cum.
------------+-----------------------------------
never | 6 3.87 3.87
rarely | 52 33.55 37.42
sometimes | 87 56.13 93.55
often | 10 6.45 100.00
------------+-----------------------------------
Total | 155 100.00
tab post_del_lifen
Delay | Freq. Percent Cum.
------------+-----------------------------------
never | 17 11.04 11.04
rarely | 77 50.00 61.04
sometimes | 58 37.66 98.70
often | 2 1.30 100.00
------------+-----------------------------------
Total | 154 100.00
2. Then I did the paired t-test (see below).
My question is, is finding the mean after converting those categories to numbers and then using a paired t-test to see whether there was a significant difference between the two means, a valid way of doing it? It's the only way I can think of (although I am sure there are far more sophisticated ways..)
Thank you very much!!
Paired t test
------------------------------------------------------------------------------
Variable | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------+--------------------------------------------------------------------
pre_mo.. | 154 2.655844 .0532294 .660559 2.550685 2.761004
post_d~n | 154 2.292208 .0544477 .6756776 2.184642 2.399774
---------+--------------------------------------------------------------------
diff | 154 .3636364 .0468136 .5809411 .2711519 .4561208
------------------------------------------------------------------------------
mean(diff) = mean(pre_mor_del_li~n - post_del_lifen) t = 7.7678
Ho: mean(diff) = 0 degrees of freedom = 153
Ha: mean(diff) < 0 Ha: mean(diff) != 0 Ha: mean(diff) > 0
Pr(T < t) = 1.0000 Pr(|T| > |t|) = 0.0000 Pr(T > t) = 0.0000
Related Posts with Is my use of a t-test with this data appropriate?
2 sequential loops, second loop only runs those instances that converged in the firstHello all, I'm running several instances of a maximum likelihood routines in a first set of loops. …
Creating*copies with missing valuesHi Stata users, I have a dataset as shown in the example below Code: * Example generated by -data…
Need help with i.year output in aregHello, Thanks for all the help I've received through this forum. I wanted to understand why I got 2 …
create a dummy variable if variables in two groups matchHello stata users, I would like to create a dummy variable if any variables in two different groups…
Merge based on time-range conditionHello everyone, I have 2 datasets that needed to be merged. Dataset A has unique IDs with multiple …
Subscribe to:
Post Comments (Atom)
0 Response to Is my use of a t-test with this data appropriate?
Post a Comment