 program define panova
 version 4.0
 local treat "`1'"
 local x "`2'"
 local subj "`3'"
 quietly {
 anova `x' `subj' `treat'
 test `treat'
 global S_1=_result(6)
 }
 end