I am trying to do a t test for values I stored in scalars that I extracted from a regression analysis on panel data-set (see sample code A). but Stata is not allowing me to use the scalar names as variable names (error:'Type7df' found where integer expected
). Is there a way to use the scalar values instead of their names?
. display Type7df
3506
. display Type7b
-.14521431
. display Type7se
.05345269
. display Type8df
3403
. display Type8b
-.00643857
. display Type8se
.06156362
**. ttesti Type7df Type7b Type7se Type8df Type8b Type8se
Resulted in the error:
'Type7df' found where integer expected
r(7);**
Sample code 1:
xtreg maxofact NCLB Asian_P White_P Black_P Hispanic_P economic_P atRisk_P teachers_P funds if types ==7, fe
estimates store fixed7, title(Non-Metro: Stable)
matrix Type7Mx = r(table)
matrix list r(table)
scalar Type7b = Type7Mx[1,1]
scalar Type7se = Type7Mx[2,1]
scalar Type7df = Type7Mx[7,1]
....