Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 73258

T Tests and Wilcoxon Tests

$
0
0
Hello Members

I had been working on EViews for some time, I shifted to Stata now, since I am new, I have been trying to calculate T and Wilcoxon Tests of Difference (of two variables).
I have about 24 different variables. VarA VarB VarC VarD and Var1 to Var20.

I need to calculate T and Wilcoxon tests in this way:

VarA = Var1
VarB = Var2
VarC= Var3
VarD = Var4

VarA = Var5
VarB = Var6
VarC = Var7
VarD = Var8

and so on to

VarA = Var17
VarB = Var18
VarC = Var19
VarD = Var20

I need to do it for both tests and it will take a lot of time to do for both tests. And I also need to export these results to Excel or Word. The important results I need from these tests is the T and Z values, means and its differences and P value.

I am simply using command for T-Test:
ttest VarA=Var1 if sample_common==1 // for common sample
and for Wilcoxon:
signrank VarA=Var1 if sample_common==1

I did it in EViews and it took days. Can anyone please help me in this matter for Stata. Any help will be highly appreciated.

PS: I have other names for these variables on my Stata files. but if I needed to apply loop and if I had to change the names, I would.

Many thanks in advance
Qureshi Qazi

Viewing all articles
Browse latest Browse all 73258

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>