Econometrics Flashcards
How to formulate a model?
- Statement of theory/hypothesis
- Collect data
- Specify mathematical model and stats theory
- Estimate parameters
- Check for model adequacy
- Test hypothesis
- Use model for predictors
Types of data and examples?
Time series: e.g GDP, unemployment. Can be both quantitative (e.g. prices) and qualitative (gender)
Cross-section: Data on variables from one point in time
Pooled: Combination of both
What is a linear regression?
Regression studying the linear relationship between dependant (explained) variables and independent (explanatory)
What is the population regression function?
Mathematical representation of the line of best fit
What does the error term represent?
- stochastic error (random probability)
- Represents variables not in the model
- Randomness of human behaviour
- Errors of measurement
- Ockham’s razor (keep simple until proved inadequate)
How is a sample regression function different?
Used when you can only estimate values using a sample of the data. Error term is a residual (ei) and Y has a ^ as it is an estimate. Get as close to the PRF as we can
How does OLS work?
Aims to minimise the value of the residual sum of ei^2.
Equation for B1 and B2
Mean of Y - B2(Mean of X) = B1
Sum of XiYi - (n)(mean of x)(mean of y).
ALL DIVIDED BY
Sum of Xi^2 - (n)(Mean of X)^2)
OLS properties?
- SRF passes through the sample means
- Mean of residuals is 0
- Sum of residuals and explanatory variables X is 0 (uncorrelated)
Difference between percentage increase, and percentage point increase?
6%- 7% = 1% percentage point increase
((7-6)/6) x 100 = 16.6% percentage increase
Assumptions of OLS model?
-Linear parameters
-X is uncorrelated with U
-E(u l xi) = 0
-Var (u) = δ^2
-No correlation of error terms (autocorrelation)
cov (ui, uj) = 0 (I and J not equal)
-No specification errors
What is homoscedastic variance? How is it calculated?
All variables have the same variance
Sum of residuals squared (RSS) / n -2 (degrees of freedom)
What is the Gauo- Markov theorem?
OLS estimators are BLUE: Best linear unbiased estimators
What is the central limit theorem?
If there is a large number of independent and identically distributed random variables then the distribution of their sum tends to a normal distribution as the sample reaches infinity
When is the T distribution used?
To test the null that Ho: B2 = 0, to see if there is a relationship between X and Y and the true variance is unknown
T test equation?
(b2 - B2) / se (b2) approx equal to t, n - (n-1)
Why might a one tailed test be used?
If you think the value is definitely above 0 for example
What is the total sum of squares ( sum of y^2) equal to?
ESS + RSS
(b2^2 x sum of (x^2)) + Sum of residuals squared
Proof that TSS = ESS + RSS
Y = (Y^) + e (Y - MeanY) = (Y^ - MeanY) + (Y - Y^)(e) y = b2xi + e and Y^ = b2xi Solve out... Sum of y^2 = b2^2 x sum of x^2 + sum of residuals squared
If the line is a good fit what relationship does ESS and RSS have?
ESS > RSS
How can R^2 be calculated?
ESS/TSS
OR
1 - Sum of residuals / sum of y^2
What is a normality test and some examples?
Used to see if data is close to a normal distribution. Tests include histogram of residuals, probability plot and Jarque- bara test
How is the Jarque-Bara test conducted?
Test skewness and kurtosis for a normal distribution match (small value = normal)
n/6 (skew^2 + (kurt - 3)^2 /4)
What is forecasting?
Using the equation to predict the value outputted (only use numbers within the range to avoid extrapolating)
What does B2 measure in a multiple regression?
The change in the mean of Y, per unit change in X2 holding X3 constant
What is multicollinearity?
When an exact linear relationship exists between the explanatory variables
How to use P value for significance testing?
Calculate T test statistic. Calculate the P value.
“If the null hypothesis is true, what is the probability that we’d observe a more extreme test statistic in the direction of the alternative hypothesis than we did?”
Set the significance level, α (type 1 error) at 5% etc. If the P-value is less than (or equal to) α, reject the null hypothesis in favor of the alternative hypothesis.
What do lower P Values mean?
More chance of rejecting the null
What is the test of overall significance?
Ho; B2 = B3 = 0, jointly and simultaneously equal to 0, no influence on Y. Can be significant variables together even if not apart
Equation for the F test?
ESS/ D.F Variance explained by X2 and X3 over
RSS/D.F Unexplained variance
K-1 df in numerator
N-k df in the denominator
What does K and N represent?
N: Number of partial slope coefficients
K: Number of parameters (slopes and intercept)
What does a large F value mean?
More evidence that X2 and X3 do have an effect on Y
Equation linking F and R^2
F = R^2 / (K-1)
(1-R^2) (N-K)
n= Number of observations k= number of explanatory variables
When R^2 = 1 what does F equal?
Infinity
TSS in terms of R^2
(Sum of y^2) = R^2 (Sum of y^2) + (1-R^2)(Sum of y^2)
What is a specification bias?
If X3 is ignored then X2 displays the gross effect of X2 and indirect effect of X3 by omitting the values we have a specification bias
Why can’t we compare R^2 values?
R^2 is larger the more explanatory variables there are but doesn’t account for degrees of freedom- cannot compare two values!
How to calculate adjusted R^2 to compare values?
1 - (1-R^2) ((n-1)/(n-k))
Properties of the adjusted R^2?
Adjusted R^2 is less than or equal to R^2. The more variables in the model the smaller the adjusted value compared to R^2 becomes (it can become negative)
Adjusted R^2 increases in absolute t value of the coefficient is greater than 1
When can we use RLS?
This assumes some of the variables do not belong in the model, only use this when the dependant variables are in the same form
F test for restricted least squares equation?
Fm, n-k = (R^2ur - R^2r) / m
(1-R^2ur) / (n-k)
What is the elasticity coefficient?
%change in y / % change in x
What does a coefficient of B2 represent on a linear y equation with a continuous variable?
y = b1 + b2x1
A one unit change in x generates a B2 unit change in y
What does a coefficient of B2 represent on a linear y equation with a log variable?
y = b1 + b2lnx1
A 100% change in x generates a b2 change in y
What does a coefficient of B2 represent on a linear y equation with a dummy variable?
y = b1 + b2D1
The movement of the dummy from 0 to 1 produces a B2 unit change in y
What does a coefficient of B2 represent on a log y equation with a continuous variable?
lny = b1 + b2x1
A one unit change in x generates a 100*B2 percentage change in y
What does a coefficient of B2 represent on a log y equation with a log variable?
lny = b1 + b2lnx1
A 100% change in x generates a 100*B2 percentage change in y
What does a coefficient of B2 represent on a log y equation with a dummy variable?
lny = b1 + b2D1
The movement of the dummy from 0 to 1 produces a 100*B2 percentage change in y
What does a coefficient of B2 represent on a dummy y equation with a continuous variable?
Dy = b1 + b2x1
A one unit change in x generates a 100*B2 percentage point change in the probability y occurs
What does a coefficient of B2 represent on a dummy y equation with a log variable?
Dy = b1 + b2lnx1
A 100% change in x generates a 100*B2 percentage point change in the probability y occurs
What does a coefficient of B2 represent on a dummy y equation with a dummy variable?
Dy = b1 + b2D1
The movement of the dummy from 0 to 1 produces a 100*B2 percentage point change in the probability y occurs
In a log linear model what does B2 represent in comparison to B3?
B2 measures the elasticity of Y with respect to X2, holding X3 constant (partial elasticity)
What is a semi-log model?
Used to examine growth rates, by replacing ln equations with B, for regression- Only one variable in log form. Slope coefficient measures the proportional change in Y for an absolute change in explanatory variable
What is a linear trend model?
When Y is regressed on itself (Yt). This displays the absolute changes, not the relative. (Needs a stationary error term mean and variance)
What are polynomial regression models?
When the variables are not linear but the parameters are- can still use regression analysis. Be careful for collinearity.
y= B1 + B2X + B3X^2 + B4X^3
How do we standardise the variables?
This is to reduce the effect of different units- we can subtract the mean of the variable, and divide the difference by the standard deviation
yi = Y - Mean Y / Sd
What will the intercept equal in a standardised model?
0- intercept always 0 (not a regression through the origin)
What are dummy variable models analysing?
The differential intercept coefficient
Max number of dummy variables
M- 1 (number of dummy for each qualitative variable must be one less than the categories)
Lose 1 d.f for each one added
What is an interaction dummy variable?
Joint effect of two qualitative variables
What is a differential slope coefficient?
DiXi, shows how much the slope coefficient varies between the two categories
What are coincident regressors in comparison to concurrent?
- No difference in slope/intercept
- Same intercept different slopes
What are parallel regressors in comparison to dissimilar?
- Slope the same, intercepts different
- Both values different
Problems using OLS when the dependent variable is a dummy (Y)
- Binomial error term
- Heteroscedastic variance
- R^2 not meaningful
Attributes of a good model?
Parsimony: Occam's razor (Simple) Identifiability: 1 estimate per parameter Goodness of fit: R^2 Theoretical consistency Predictive power
Type of specification errors?
- Omitting relevant variables/ including extra ones
- Errors of measurement
- Adopting the wrong functional form
What problem does underfitting a model cause?
If the omitted variable is correlated with the included ones then the coefficients will be incorrect
If B3 is omitted and B32 is positive what effect will it have?
Overestimate the significance of B2
Problems caused by overfitting a model?
-OLS estimated unbiased, Variance correct, T and F valid but the estimates are inefficient with larger variances than the real model. Not BLUE, large confidence intervals
Problems caused by errors of measurement in the dependant variables?
OLS unbiased but the estimated variances are larger (increases the error term)
Problems caused by errors of measurement in the explanatory variables?
Biased OLS, inconsistent
How to check for accuracy of the model specification?
- Check T ratios and R^2,
- check signs in relation to the expected theory
- Examine residual line plot
How to do the Mackinnon-White-Davidson test?
- H0: Linear H1: Log linear. Estimate models, obtained estimated Y^
- Obtain Z1i = ln Yi - Ln Yi^
- Regress Y on X and Z, reject Ho if Z coefficient is significant (T test)
- Obtain Z2i = Antilog (Lnyi^) - Y^
- Regress ln Y on Xs or logs of X + Y, reject H1 if Z2 is significant
How to do the RESET test? (model misspecification)
- Obtain Yi, Yi^
- Re run model adding power of Yi^ , Yi^2 etc to show relationship between residuals and estimated Y
- Calculate F from R^2 formula
- If F is significant we can conclude the model is misspecified
What is the F test formula (using R^2) used in the RESET test?
F = (R^2new - R^2old)/ (number of new regressors)
(1-R^2new)/ (n- number of parameters in new model)
What happens if the explanatory variables are correlated?
Computer refuses to compute the regression with 2 variables perfectly linearly correlated with each other, this means we cannot obtain unique estimators for all parameters
Result of having imperfect collinearity on the estimates?
- OLS still blue, although one coefficient is individual insignificant
- Large variance, confidence intervals & standard errors
- Insignificant T ratios due to large standard errors
- Unstable OLS, high R^2
- Wrong signs possible
- Is a sample phenomena may not exist in the whole population
Indicators of Multicollinearity?
- High R^2, few significant T ratios
- High pairwise correlations
- Examine partial correlation (r23 with r23.4)
- Subsidiary regressions
- Variance inflation factor
What do variance inflation factors show?
VIF measure how much the variance of the estimated regression coefficients are inflated, showing how much multicollinearity exists
How is VIF calculated? Proof?
Var B2 = Standard error/ sum of X^2 (1- R2^2)
VIF = 1/1- R2^2
Values of VIF- interpretation?
VIF = 1 Not correlated
1 < VIF < 5 Moderately correlated
VIF > 5 to 10 Highly correlated
When is multicollinearity ok?
If the relationship is expected to continue into the future
How to remedy multicollinearity (ideas)?
- Drop a variable (theory/misspecification)
- New data/sample (Costly)
- Rethink the model (Take a log?)
- Prior studies on data
- Transform variables (can reduce issue)
- Combine cross and time data
What is heteroscedasticity?
When the error variance is nonconstant
When is heteroscedasticity usual found?
In cross-sectional data (scale effect of the data)
How to test for heteroscedasticity?
Sum of errors squared / n - k
Consequences of heteroscedasticity?
- No min variance, not efficient (still LU)
- OLS biased, as variance is biased
- T/F test and confidence intervals unreliable
How to detect for heteroscedasticity?
- Examine theory, will it be there?
- Plot residuals (of X against Y)
- Check for outliers
How to do the Park test for heteroscedasticity?
- Run model, square residuals, take logs
- Run model against explanatory variables (or Y)
- Test Ho: B2 = 0 (ln ei^2 and ln xi)
- If not rejected then B1 has homoscedastic variance
How to do the Glejser test?
- Obtain residuals
- Regress absolute value of e on X variable thought to be associated with heteroscedasticity
- Ho: B2 = 0 (if rejected there is probably varying variance)
- Needs a large sample as error term can also be heteroscedastic
How to conduct White’s General test?
- Regress, find ei
- Run auxiliary regression with powers and (x23)
- Obtain R^2, with no heteroscedasticity n x R^2 is approx chi squared with K-1 d.f
- If Chi is larger than critical value then reject null of no heteroscedasticity
When is the method of weighted least squares used?
When the variance of the population is known, to correct for heteroscedasticity
Proof for Weighted least squares?
-Divide each bit of the equation by known variance
-Error U = Ui/ Var i
-Test Vi^2 = Vi^2 / Var i for homoscedasticity
= E (Vi^2)
= E (Ui^2/ Var i^2)
= (1/Var i^2) (E (ui^2)
= (1/Var i^2) (Var i^2) == 1
How to use remedy heteroscedasticity when the variance in unknown?
- Transform the data e.g. error variance proportional to X, so perform square root transformation
- Trial and error to find the right deflator
What are Whites corrected standard errors and T stats?
Used when heteroscedasticity is detected, White’s corrected errors take the inefficiency into account- coefficients remain unchanged, standard errors change. The tests only work asymptotically - in large samples
What is autocorrelation?
Correlation between error terms, usually with time series
E(ui, uj) =/ 0
Problem with autocorrelation?
OLS estimators do not work as they are not efficient
What is inertia?
Sluggishness: business cycles exist in time series data, likely to be correlation
How can model misspecification lead to autocorrelation?
Variable mistakes or wrong formatting of functions can lead to autocorrelation- can test by removing variables
What is the cobweb phenomenon?
Supply reacts to price with a lag (1 time period) because supply decisions take time to implement
Consequences of autocorrelation?
- Not efficient, no min variance
- Variance biased (often underestimated) and this inflates T value (F/T Unreliable)
- R^2 unreliable
- Inefficient variance/standard errors computed
How to do the Durbin-Watson d test?
Ratio of the sum of squared differences in successive residuals to the RSS
Sum of (et - et-1)^2 / Sum of et^2
Assumptions of the DW test?
- Regression includes an intercept term
- Non stochastic X variables
- Ut = put-1 + Vt
- No lagged dependant variables in use
What is the coefficient of autocorrelation?
Dependence of error term on the previous value (p between -1 and 1) Known as Markov’s first order autoregressive scheme
Link between D and P value?
D is approx = 2 (1-p)
P = Sum of ((et) x (et-1)) / Sum of et^2
What do the D numbers mean?
P= -1 D = 4 P= 0 D = 2 P= 1 D = 0
How to do the Durbin Watson test?
- Run regression, get residual values
- Compute d
- Get critical D value from the tables
- Follow the decision rules
What are the decision rules for the Durbin Watson test?
No positive A reject if 0 < d < dL
No positive A no decision if dL <= d < du
No negative A reject if 4- Dl < d < 4
No negative A reject if 4- Du < d < 4 - dL
Major issue with the DW test?
The zones of indecision
Remedial measures for autocorrelation?
Transform model so error term is independent
- Write a 1 period lag (t-1 for all variables)
- Multiply by P
- Subtract from the original equation
(We lose 1 observation so must transform X* and Y* by rooting 1-p^2 (variable))
What is OLS called when the remedy for autocorrelation has been applied?
Generalised least squares
What is the Prais-Winsten transformation?
Used for small sample sizes to transform autocorrelation data after its remedied as one observation is lost
(We lose 1 observation so must transform X* and Y* by rooting 1-p^2 (variable))
How to estimate the P used for PW transformation of autocorrelation?
- P is 1, assume positive autocorrelation (no intercept)
- Use P from DW, so P ~= 1 - d/2
- Get P from residuals, et = pet-1 + vt (bias in small samples)
What is the Newes- West method for autocorrelation?
Used in large samples- compute corrected values straight from OLS. HAC testing done on computer programmes
What is the Runs test for autocorrelation?
Note the signs of the residuals, a run is uninterrupted sequence of one sign. Test for the randomness of the runs (Too many = negative , Too few = positive)
What is the Breusch Godfrey test?
-Run residual test
-Now run et = normal regression + p1 Ut-1 + P2 Ut-2 etc (Regress time against original)
-Calculate NR^2
(n = number of observations in the basic series - P)
-Compare to Chi-squared tables
What is a bilateral relationship between variables?
When a unidirectional relationship cannot be maintained- the Xs affect Ys, and the Y affects Xs e.g. income and consumption are linked
Why does OLS not work on bilateral variables?
- OLS is not BLUE
- Y and Ut must be correlated, so B2 is biased in small samples and inconsistent in large ones
What is the indirect least squares method?
When you change the regression around to use different variables, and then solve
B1 = A1/ (1 + A2)
Does indirect least squares work?
Are consistent estimators but may be slightly biased in very small samples
What is the identification problem for simultaneous equations?
We can’t tell which way the relationship of the regression goes (E.g. supply or demand side). Regression only shows intersection not the slope
When is an equation exactly identified?
When we can identify individual parameters, if not it is underidentified
What is overidentification?
When we have more than one value for a parameter of a simultaneous equation
What are the order conditions of identification?
K- number of excluded variables
M- Endogenous variables
k = m-1 Exactly
k > m-1, Over
k < m-1, Under
What is the method of two stage least squares used for?
To estimate an overidentification problem
What do we do for the method of two stage least squares?
- We use a proxy for variable in place of Y so it is uncorrelated with U
- Write into regression with U as Y
What are dynamic models?
Involve change over time
Why do lags occur?
Psychological: Habit, time to adapt
Tech: Consumers wait for new models/price changes
Institutional: Contracts can’t be changed continually
Problems with adding lags to models?
- No max log equation
- Lose 1d.f for each lag
- Multicollinearity risk
What is the Koyck adaptive expectations technique?
Use Y and Yt-1 as the variables so you only lose less degrees of freedom
- Must use Durbin H stat
- Check for correlation with error term
- Need larger sample
What is a good rule of thumb to spot a “spurious” (nonsense) regression?
R^2 > d
What is the unit root test?
-Let Yt represent stochastic time series of interest
-Ho: Yt-1 = 0 (non stationary)
-Conduct Tam test (Dickey-Fuller)
If A3 > tan we reject the null (Data is stationary)
What is a cointegrated time series?
When a long run equilibrium relationship occurs between non-stationary variables (combined may be constant)
What is the random walk theory?
Things like stock prices cannot be predicted on the basis of values today
What is a drift parameter?
Stochastic drift is the change of the average value of a stochastic (random) process
What is a logit model?
When Y is binary (0,1)
Problems using OLS on binary models?
- No guarantee OLS value will be between 0 and 1
- Error term is binomial and heteroscedastic
- Assumes Y increases probability with explanatory variables
How do logit functions work?
ln (P/(1-P)) is used instead of Y. P represents the odds that Y equals one of the categories (e.g. p = 1 is the probability that Y=1)
Features of the logit model?
- L is linear to Y but the probabilities are not
- Can add extra variables
- If L (logit) is positive, when X increases the odds of Y=1 increase