1. Stata's
predict command (from Econometrics by Simulation):
* Stata's predict command is an extremely useful command for many purposes.
* In this post we will go through how it works. And manually program in long hand some of the things it does.
* First let's start with OLS
* Imagine the underlying population model Y = g(x1, x2)
* Now imagine an estimator Y = f(x1, x2)
* What most estimations do is they take the Y and the xs and estimate some variant of f.
* In the linear case Y = b0 + b1x1 + b2x2 + u
* Most estimation commands attempt to estimate b0, b1, and b2. Which is great!
* But after estiamting b0, b1, and b2 what we may ask,
* "How does u look? Does it look normal, thus justifying the use of OLS?"
* We may also ask, "How does the estimated y look? This is often not particularly interesting since it is purely linear but often 'yhat' the predicted y is used in post estimation techniques."
Approximating unknown (continuously differentiable) functions by using a Taylor (MacLaurin) series expansion is common-place in econometrics. However, do you ever pause to recall that such approximations are only locally valid - that is, valid only in a neighbourhood of the (possibly vector) point about which the approximation is made?
Unlike some other types of approximations - such as Fourier approximations - they are not globally valid.
No comments:
Post a Comment