Hi everyone!
I want to test if the difference between two scalars is statistically significant at 10%, 5% or 1%, do you possibly know how to achieve that? The following is my code and data, but it didn't show up the t-statistics. Many thanks for your time in advance!
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
I want to test if the difference between two scalars is statistically significant at 10%, 5% or 1%, do you possibly know how to achieve that? The following is my code and data, but it didn't show up the t-statistics. Many thanks for your time in advance!
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long Name double(mean1 mean2) 1 1.8383807419289167 1.7266930261427125 2 .23570075560114517 .16440843279268563 3 .17996988718763549 .20369058384697425 4 5.620516515152281 5.805663871321566 5 2.5813825628443197 2.6832247877277484 6 -.06357658493897562 -.011365789056073154 7 .18118794957284806 .17398404645983095 8 5.286552811590096 5.824117617449302 end
Code:
ttest mean1== mean2 if Name== 8
Paired t test
------------------------------------------------------------------------------
Variable | Obs Mean Std. err. Std. dev. [95% conf. interval]
---------+--------------------------------------------------------------------
mean1| 1 5.286553 . . . .
mean2 | 1 5.824118 . . . .
---------+--------------------------------------------------------------------
diff | 1 -.5375648 . . . .
------------------------------------------------------------------------------
mean(diff) = mean(mean1- mean2) t = .
H0: mean(diff) = 0 Degrees of freedom = 0
Ha: mean(diff) < 0 Ha: mean(diff) != 0 Ha: mean(diff) > 0
Pr(T < t) = . Pr(|T| > |t|) = . Pr(T > t) = .

Comment