Cross-section Metrics Flashcards
Sources of endogeneity
OVB, measurement error, reverse causality
Derive OVB
Derive on paper
Why adjust R^2?
And what is adjusted R^2?
Guaranteed to rise as we add variables: = 1-((n-1)/(n-k-1))(SSR/SST)
Unbiased estimate of S^2?
When uihat=Yi-b0hat-b1hatx1 etc
((1)/(n-betas))*sum of ui squared
GM Assumptions
Linearity / fixed or stochastic non identical regressors / exog / homeskedastic / no serial correlation / no perfect multicolinearity
If GM and e is normal dist?
(bhat - b)/(se(bhat)) ~t n-betas
Partialling out
OV to purify effect.
Reg ind on OV then reg Y on residual to get true effect!
Var of b1hat OLS one regressor
Var of error / Var(X)
Var of b1hat OLS with many regressors?
Var of error / (1-R^2 of X on other regressors)*SSTx
If large sample test b1=x
b1hat -b1 / (se b1hat) ~N(0,1) by CLT
F stat
F=((SSRr-SSRur)/(#restrictions))/(SSRur)/n-betas ~F#,n-betas
Linear combination test
t test
Non linear regressors / interactions
Test jointly (F).
Interactions: consider if compliments / substitutes!
Assumption of F test
All GM plus normal errors!
Law of Iterated Expectations
E(X)=E(E(X given Y))
Ramsey Reset what tests
Model specification. Should be add higher powers / cross terms
How to set up ramsey reset?
Reg yihat on xis and higher powers of yihat. Test (jointly coefficients on higher power yihats) F
Predict w if lnw=b0+b1x+b2y
Must remember Jensen’s inequality: Time e^(var of error/2)
Dummies thing to remember
Be precise and careful on comparison groups!
Chow test
Is model same for A and B groups? Just F test between the 2!
Asymptotics crucial when?
Not ~ N
Chebyshev’s inequality
As n to infinity, we can say confidence interval of xbar to correct value becomes very small!
Preservation of unbiasedness/ consistency by continuous transform?
Unbiasedness: no (see Jensen).
Consistency: Yes by continuous mapping theorem!
Slutsky’s theorem
If Xn converges to dist X and Yn converges in prob to C, then Xn/Yn converges in dist to X/C!
Use Slutsky’s on beta1hat - beta1
CLT on numerator and LLN on denom
Lagrange Multiplier test
nR^2 ~a~ Chi squared dof betas
Effect of hetero
inefficiency, increasing Var(b1hat ols)
Causes of hetero
Model misspecification (eg OVB/subpopulation differences/wrong functional forms)
IVs
Measurement error
Also genuine hetero!
Tests for Hetero
Goldfield Quandt (archaic)/Breusch Pagan/ White
GQ hetero test
Split sample in 2. Thus must be monotonic hetero
BP assumption
Assumes normality of errors.
Logit distribution?
e^x/(1+e^x) = 1/(e^-x+1)
BP type 1:
1: Test if variance of errors linear in one regressor (regress uihat squared on that regressor and test if coefficient =0)
BP type 2:
2: test if variance of errors linear in all regressors
BP type 3:
Reg uihat squared on predicted Y and test if significant
White’s test
Include square and cross terms: reg uihat squared on higher powers of predicted y (F test)
BP vs W
W+: Relaxes U~N. Flexible functional form so can find any form of hetero
W-: Doesn’t determine form of hetero. Loses power fast as increases #regressors.
GLS
If we know form of hetero, adjust each value by sqrt of scaling to variance!
Feasible GLS
GLS but when we must estimate form of hetero
Outliers
Anomalous (eg not from same population).
Random error in outcome
Derive on paper. No effect on estimate, but larger se
Random error in regressor
Derive on paper.
Attenuation bias!
Proxy variables difficulty
Eg if we use IQ as a proxy for innate ability, we must have IQ uncorrelated with all other parts of abil!
Cov(X,Y)
E(XY)-E(X)E(Y)
How to derive beta IV
Take Cov wrt IV on both sides and becomes very simple. By LLN, beta1hat IV converges in prob to beta1
Wald Estimator
Binary IV:
Reg Y on Z and Y on X to get:
beta1hatIV=(Ybar1-Ybar0)/(Xbar1-Xbar0)
betaIV aymptotics
Normal by Slutsky’s and CLT
Weak instruments issue
Relevance is barely met and so se is very large
Exog fails IV
Inconsistent
2sls stages
1- Reg X1 on Z and other controls. (can test relevance)
2- Use X1hat as regressor for Y
Over-ID for IV?
More z vs endog regressors.
Hausmann test
Hausmann test for IV over-ID
Assume one IV valid. H0: beta1 same for both Zs. H1: different.
Test stat: Chi-squared with one restriction.
What to do if weak instruments
Regress endog on IVs and compare to restriction of all = 0. Weak if F<10. Find better ones or drop weaker ones
Anderson Rubin Test
Weak zs and want to test H0: beta1=beta1 nought.
Suppose we have lwage=beta0 + beta1educ…
Then lwage=lwage-beta1educ
Reg lwage on all else.
AR test stat is F stat for IVs and so reject if AR > Chi squared(#)/#
Test for endog
Why
How
If exog, 2sls is unnecessary and inefficient vs OLS
Assume: valid instruments.
ei is residual from regressing X1 on Z
Endog: ui=gamma*ei +epsiloni. Exog:Cov(ui,ei)=0
Thus, reg y on all plus ei and t test if significant on ei!
Reduced form simultaneous
Rearrange for outcome variables.
Simply regressing gives us a weighted average of the two elasticities (each curve)
Treatment effects what do we observe
Assignment prob and avg outcomes, but not counterfactuals!
Observed diff=
Add and subtract (E(Y(1)givenD=1)).
This gives us ‘Average effect of Treatment on Treated’ plus selection effect
selection effect on obs diff
Often, whether or not treated is endogenous and so biases obs away from ATT (down if being treated is desirable)!
Problems affecting validity
Contamination, non compliance, hawthorn, john henry, placebo
Internal- contamination (treated even though not in group) and non compliance (other way)
Hawthorne effect - Participants change behaviour due to being in trial
John Henry - Control group changes behaviour
Placebo- Perceived changes (not actual) change outcomes
Conditional independence assumption
Assignment to treatment ind. of outcome given covariates.
If true, leads to OBS dif given Xi=x) = ATT = ATE (Avg treatment effect)
CIA vs IV
CIA: Fix selection bias by zooming in on closely defined subgroups
CIA may not be practical: may need to specify v specific group!
FD Goal
Goal: Destroy time invariant effects (may be correlated with obs regressors)
FD assumptions
strict exog (tough often) and other GM! For blue
If also, normal errors then valid for small samples
Arellano-Bond
IV for panel data when feedback from the past leads to violation of strict exogeneity! Z is xi1
Relevance: Cov(xi1,deltaxi3)=/=0
Exclusion: cov(xi1,delta epsiloni3)=0
AB method
Reg delta yi3 on delta xi3 using 2sls (instrument is xi1) to estimate beta1
Fixed effects
Subtract time mean from each observation.
FE vs FD
T=2: identical
T>=3: Close but non identical.
FE is more efficient if no serial correlation in epsilonit.
Must be careful with FE if n is small relative to t!
FD can eliminate serial correlation if error follows a random walk
MLE
Choose theta hat s.t. we max out (ln)likelhood function. Clearly, MLE depends on sample we observe!
MLE properties
MLE effectively exploits all info in data for parametric estimation.
Consistent, asymptotically normal, asymptotically efficient (although generally biased)
Asymptotic MLE to ~
Converges ~ to N(parameter,Inverse of Fisher information/n)
Think of I^-1(parameter) as asymptotic variance of parameter MLE
Likelihood ratio test
2(logLikelihood ur − logLr) ~ Chisquared1
Probit assumes
Homoskedastic required for consistency. Assumes normality of errors in latent!
P(Y=1givenX)=P(Y*>0givenX)=
1-P(ui<=-Xibeta given X)
Use Normal CDF
Marginal effects of probit
Average marginal partial effect or partial effect at average
Dummy- Evaluate using CDF
Continuous- Evaluate using normal PDF = beta1*normalPDF at that point!
To choose betas in MLE
Set del l / del beta = 0 for all betas! This maximizes likelihood by choosing betas
Logit easier to work with?
Residuals always sum to zero (unlike probit) implying all have same weights in the FOC
Logit marginals
Dummy: Just compute at =0,1
Continuous: Differentiate leads to marginal = β1Λ (Xβ) (1 − Λ(Xβ)).
Pseudo R^2 MLE
1-(lur/lr)
Restricted to only one intercept!
Goodness of Fit
Percentage of time that Yi is correctly predicted
Probit/logit endogeneity
Use 2SLS control function method
Control function method
Include both residual (exogenous variation in endog variable) and the variable to separate the endogenous and exogenous effects!