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

Foreach loop for a series of t-tests

$
0
0
I want to run a series of t-tests in a foreach loop. I want the t-tests to be performed on each sub-population in a variable called Category. Category is a string variable with about 20 different values. I know the code below isn't correct but it's what I have to start.

foreach var in Category {
ttest TotalRVUdbsum, by(scribe)
}

Viewing all articles
Browse latest Browse all 73529

Latest Images

Trending Articles

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