如果编写loop进行批量t检验

我写的这个执行不了,想请教正确写法,谢谢!

foreach v of price weight{

ttest `v', by(group)

}