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)
}
foreach var in Category {
ttest TotalRVUdbsum, by(scribe)
}