I would like to perform a statistical test of the difference between two point predictions obtained from separate regressions, but I don't seem to know how to go about it. This would seem to be a pretty basic exercise, but I seem also to ignore the statistics behind it, so I would very much appreciate someone's help.
To illustrate, consider this dataset:
Code:
clear set seed 1234 set obs 1000 drawnorm x e gen y1 = 2*x + 3 + e gen y2 = 3*x + 4 + e
I run these two regressions, and I obtain the fitted values (and, for good measure, the standard error of the fitted values). To illustrate my question, let me also plot the regression lines.
Code:
reg y1 x predict y1h, xb predict se1, stdp * reg y2 x predict y2h, xb predict se2, stdp * twoway (line y1h x, sort) (line y2h x, sort)
How should I proceed?
0 Response to Test for the difference between two point predictions obtained from separate regressions
Post a Comment