Page 1 of 1

Heterogeneity test

Posted: Fri Aug 10, 2012 2:39 am
by atarca
Dear Tom,
While running the @panelfm procedure, I have two regressors. How should I change the rows below to compute the heterogeneity test(s) with two slope coefficients? Also, if I have a trend term do I need additional changes in the program below? Thank you very much for your help in advance.
Regards,
atarca

* Heterogeneity test (slope coefficient only)
*
sstats(mean) 1 %ngroup %%ixx(t)(1,1)>>meanvar %%ibetas(1,t)>>meanbeta
dec symm v(%ngroup,%ngroup)
dec vect b(%ngroup)
ewise v(i,j)=(i==j)*%%ixx(i)(1,1)-(1.0/%ngroup)*%%ixx(i)(1,1)-(1.0/%ngroup)*%%ixx(j)(1,1)+1.0/(%ngroup)*meanvar
ewise b(i)=%%ibetas(1,i)-meanbeta
compute hettest=%qforminv(v,b)
cdf(title="Heterogeneity Test") chisqr hettest %ngroup-1