EC2C3

¡Supera tus tareas y exámenes ahora con Quizwiz!

Data contained in table created by sum command in Stata

# observations mean standard deviation min value max value

t-statistic formula in hypothesis testing

(Estimate - Null Hypothesis)/Standard Error

Stata commands for first differences

(tell Stata there is panel data - must do this first) xtset varlist (sort data by variables of interest) sort varlist (create variables for diffrences) gen diff_var = d.var

Auxiliary regressions & OVB formula for multiple controls

1 auxiliary regression for each control (as outcome) with variable of interest (as only regressor) OVB: Bs = Bl + (B2l X d11) + (B3l X d12)

Critical value for 5% (1-tailed test)

1.645

Critical value for 5% (2-tailed test)

1.96

Calculating exact % change with ln(Yi)

100 X (e^B1 - 1) is exact percentage change in outcome associated with regressor increasing by 1

Advantage of using 2sls when equation is overidentified

2sls allows for one estimate of coefficient that can incorporate effect of many instruments

Dummy variable

A binary variable which can only take 2 values: coded D = 0 or D = 1 for qualitative data or to break a continuous multivalued variable into a binary variable

Identification in IV

A parameter in a structural equation is identified if we can work back from reduced form coefficients to estimate it A parameter if identified if given infinite information we can learn the true parameter (otherwise, it is unidentified) - estimation method is valid when sample size is not a problem

Non-saturated regressions & CEF

A regression model with a different number of parameters & conditional expectations If CEF with all dummys = 1 happens to be true, then regression will fit CEF, but otherwise, it will select a & B to give the best linear approximation to the CEF

What is a control in regression?

A regressor used to hold confounders fixed For causal interpretation, controls must capture all confounders

Bad controls

A variable that introduced a new confounder, so regression gives biased estimates as at each level of the control, the treatment will not be as good as randomly assigned & no causal interpretation can be made It is not always better to include more controls in regressions as any confounder for any variable in a regression will make all estimated coefficients biased (even if treatment is randomly assigned, bad controls reintroduce selection bias) Controls should not be outcomes of treatment, should only be variables which determine treatment

What is a confounder?

A variable which is correlated with both the treatment and the outcome

Nonlinearities & regression discontinuity

Add polynomials to each side of cutoff if there are non-linear relationships e.g. quadratic relationships either side of threshold: Yi = Bo + B1(x1i - D) + B2(x1i - D)^2 + B3x2i + b4[x2i X (x1i - D)] + B5[x2i X (x1i - D)^2] + ui To know degree of polynomial to use, look at graph of data with linear function & estimate polynomial degree to use - usually include one higher power than estimate & see if it changes result Including extra regressors (e.g. polynomial versions of regressors) increases variance but will not bias estimates (unless there is overfitting) If window is narrow enough, every polynomial is approximately linear

Reducing OVB

Adding more controls for confounders

Selection bias vs. OVB

Adding more variables/controls may eliminate OVB, but may still have selection bias as not all confounders can be observed, so cannot be controlled for in regressions

Why is matching on all confounders unfeasible?

All confounders must be observable & there are many, so would be difficult to identify and match on all of them If could identify & match on all confounders, would reduce sample size a lot, thus LLN not work

Advantages of using categorical dummy variables instead of quadratic/cubic?

Allows for flexible nonlinear effects to be examined, can separately estimate relationship for each range of xvar on yvar & imposes no functional form assumptions (which could be wrong & then not create causal estimates)

Implication of hetero/homoskedastic data on standard errors

Always use robust standard errors as this allows for Var(ui) to change with X, accommodating for heteroskedastic data Robust standard errors will be same as regular SE for homoskedastic data (robust SE requires large n)

What is a counterfactual?

An unobserved potential outcome that would be observed under a different treatment status (with everything else remaining the same)

Implications of fixed effects estimator

Any variable that is constant through time is omitted (but first observations remain)

Why is coefficient on regressor of interest in long regression same as residual in regression of regressor of interest on control?

Application of regression anatomy formula as residual represents part of regressor of interest which is uncorrelated with control/confounder (as OLS imposes that ui is uncorrelated with regressors), which is same as coefficient on regressor of interest in long regression, holding fixed control as this is piece of Xi uncorrelated with confounders which affects Yi

How to describe coefficient if both Y & X are in logs

Approx elasticity of Y wrt to X

Issues with estimating % changes in regressions

Approximation is only reasonable if the change in ln(w) is < 20% (0.2) For ln(Yi), |B1| < 0.2 For ln(Xi), change in X must be < 20% Values higher than this may have approximation error

Using regression anatomy, how does OLS 'match' on controls?

As OLS creates residuals which are uncorrelated with regressors, by including controls as regressors & holding them fixed, can isolate piece of regressor of interest which is uncorrelated with confounder (as regression of regressor of interest on control will produce residuals uncorrelated with control, so control is no longer correlated with regressor of interest through residuals) Creates version of regressor of interest which is uncorrelated with confounders

Comparison of R^2 in long vs short regression

As Var(Yl) >/= Var(Ys), long regression has weakly larger R^2 than short as by adding new regressor, R^2 could never decreases

Mechanism behind bad controls introducing new confounder

As bad controls are outcomes of treatment, to hold them fixed while changing treatment (would ordinarily change control) requires that another variable must have opposite effect than treatment for control to stay the same --- other variable is now correlated with treatment (& Yi), so is now a confounder

How many first stage equations will there be?

As many as there are biased regressors

Impact of n on t-stat

As n increases to infinity, SE decreases to 0 & t-stat diverges to +/- infinity unless B=0 t-stat gets very large as n increases as SE decreases (denominator), so usually reject Ho

Central Limit Theorem (CLT)

As sample size for both groups increases, the distribution of the t-stat approaches the standard normal distribution

How does LLN remove selection bias?

As the sample size increases, the effect of random differences between individuals in control and treatment groups is smaller, therefore if treatment is randomly assigned, this will isolate the effect of treatment (causal effect of treatment as average difference between treatment and control groups)

Law of large numbers (LLN)

As the sample size tends to the population size, sample statistics accurately estimate population parameters Using larger sample sizes averages out random differences between individuals in treated and control groups The sample average tends to the population mean as sample size increases

How does adding more controls exacerbate attenuation bias?

As x variable is mismeasured, attenuation bias means that estimate is biased towards 0 compared to true value Adding controls which are correlated with mismeasured variable exacerbates attenuation bias, so estimates get even closer to 0

Replace command in Stata

Assigns new values to an already existing variable

Regression discontinuity assumption

Assumes individuals are as good as randomly assigned to side of threshold (cannot choose which side of threshold they are on), so individuals who just barely receive treatment & barely do not exhibit similar unobservable characteristics, so changes due to treatment can be attributed entirely to causal effect of treatment Assumption fails if individuals can self-select onto a side of the threshold as individuals just either side of threshold will exhibit different characteristics which could be confounders

Attenuation factors in bivariate vs multivariate regression

Attenuation factor in bivariate regression >/= attenuation factor in multivariate regression, so attenuation bias is worse when including correlated regressors (as smaller attenuation factor = more attenuation bias) as holding fixed controls reduces good variation of regressor of interest, so the ratio of good variation to random variation due to error gets worse/X has less predictive ability on Y As formula for attenuation factor = good variation/total variation

Regression

Automates calculation of weighted average for matching when estimating treatment effects (regression allows matching on continuous variables)

How does randomisation of treatment allow one to estimate ATE, given ATT & no selection bias?

Average Y0i & Y1i are same for all individuals since they are randomly assigned to treatment or control groups, so ATE is same for all individuals

General formula for Wald estimator

B1 = (E[Y|z=1] - E[Y|z=0])/(E[x|z=1] - E[x|z=0]) where (E[Y|z=1] - E[Y|z=0]) = coefficient from reduced form (E[x|z=1] - E[x|z=0]) = coefficient from first stage

Formula to estimate B1 with OLS

B1 = Cov(Yi, Xi)/Var(xi)

Comparison of B2sls & Bols estimates

B2sls = Cov(Yi, Zi)/Cov(Xi, Zi) Bols = Cov(Yi, Xi)/Var(Xi) (uses treatment as the instrument)

B2sls estimate using covariances

B2sls = Cov(Yi, Zi)/Cov(Xi, Zi) When instrument changes, how does outcome change?/When instrument changes, how does treatment change?

Which qualities determine bad controls?

Being determined by treatment/after treatment as may be causally related to regressor of interest, so introduces new confounder when held fixed

What type of bias does regression discontinuity solve?

Bias due to omitted confounders (OVB) as omitted variables are uncorrelated with treatment due to restriction of observations around the threshold - treatment is as good as randomly assigned

Possible biases in panel data

Bias due to time trends (if compare after vs before in treated group only), so B1 will bundle together the effect of treatment with all other factors correlated with the outcome that changes after treatment (unobserved) Bias due to fundamental differences between treated & control regions (if compare after period in both regions only), so B1 will bundle together effect of effect of treatment & effect of other factors which differ between regions DiD estimator overcomes both sources of bias

Effect of classical measurement error in regressor

Bias in estimates Attenuation bias - estimates closer to 0 than true value

Direction of attenuation bias

Bias towards 0, so estimate will be between true B & 0 Since classical measurement error is uncorrelated with X, it has no predictive power, but as X contains more measurement error, its predictive power of Y decreases, so since X is a combination of its true value and random error, the coefficient is between ) & true B (if all X was random error, coefficient would be 0) Since the random variation in X caused by random error is nonconstant (uncorrelated with X), Var of a nonconstant is always +ve, so the denominator in calculating B becomes larger, so B estimate is closer to 0 than true B |B estimate| < |B|

(Non-classical) measurement error in Y which is correlated with X

Biases OLS estimate, e.g. mismeasurement in Y is only present when X=1

Estimating Biv

Biv (for equation of interest/second stage) = B (from reduced from)/B (from first stage) (effect of instrument on outcome divided by effect of instrument on regressor of interest/treatment to isolate effect of instrument on outcome through treatment without confounders)

Wald estimator & when to use it

Biv = B (from reduced form)/B (from first stage) Only used when instrument is a binary/dummy variable & when there are no controls in the second stage equation

How does Biv overcome selection bias?

Biv = B (from reduced form)/B (from first stage) Reduced form & first stage equations have no selection bias, so estimating Biv using estimates from these equations eliminates selection bias Rescales estimated effect by the fraction of the population affected by the instrument Estimates proportion of variation in Yi which is explained by Zi

Formula for Bo

Bo = mean(y) - B1 X mean(x)

Simultaneity in regression & structural equations

Both outcomes are simultaneously determined by each other so there are 2 parameters/mechanisms which explain the relationship Structural equations show this relationship (show structure of the system) - equations of interest

How does OLS miscalculate B1 in simultaneity (graphical explanation)?

Both supply & demand curves move simultaneously (by ui), so points of intersection from this predict the OLS line which is biased by joint movements in both curves at the same time

OVB formula

Bs - B = slope coefficient for omitted variable in long reg X slope coefficient of omitted variable on variable of interest in auxiliary reg Bs = B + (slope coefficient for omitted variable in long reg X slope coefficient of omitted variable on variable of interest in auxiliary reg) if either coefficient = 0, there is no OVB

Relationship between long and short regression coefficients

Bs = B + ypi1 Coefficient in short regression is equal to coefficient in long regression plus omitted variable bias (OVB) Found by substituting the auxiliary regression into the long regression

Conditional expectation function (CEF) with a dummy variable

CEF only has 2 points at Di = 0 & Di = 1, between which a line is defined OLS fits this line perfectly as CEF is a linear function in this setting so regression estimates it (as saturated regression)

Direction of selection bias/bias due to confounders?

Can be positive or negative depending on effect of confounder

Dummy reparameterisation

Can define B1 for when D1 = 1 (& D2 = 0) & B2 for when D2 = 1 (D1 = 0) so that there is no constant & B1 & B2 measure the group means directly & to calculate the effect of treatment they must be subtracted

Using local command in Stata

Can fix name of all data points in a variable with a loop gen var = "" (blank) local c = 1 foreach x in var datanames{ replace var = "'x'" if var == 'c' local c = 'c' + 1 } (global is similar but stays in Stata's memory)

Time vs individual fixed effects with dummy variables

Can include dummy variables for both being individual groups & individual time periods Bo = excluded group individual fixed effect in excluded year Creates vertical shifts of regression line for different time periods & individuals

When to use 2SLS estimator in IV

Can use for all situations, but must use when instrument is not a binary/dummy variable &/or if there are controls (same estimator)

How to test if exclusion assumption holds in IV

Can't test for it, can only hypothesise whether it is plausible or not (If regressed second stage regression 7 tested statistical significance of coefficient on instrument, holding fixed everything else, might get non-zero coefficient as coefficient on treatment is bad representation of relationship with outcome, so may get nonzero coefficient on instrument which looks like direct effect, but is mechanism through treatment)

Implication of violating no perfect collinearity

Cannot create estimates

Impact of IV confounders

Cause bias in estimate of effect of interest in OLS & may cause exogeneity assumption in IV to fail, causing bias in Biv

Interpretation of coefficients for dummy variables

Change in the the outcome associated with dummy variable being 1 rather than 0

Error terms in simultaneous method

Changes in error term represent linear transformations of curves, not changes in shape (linear term)/shift along the other curve

How do RD coefficients change as window increases?

Coefficients are likely to get further from true value depending on direction of bias from confounders as RD assumption gets less plausible

How to check if IV is valid

Compare statistical significance of differences in characteristics between treated & untreated groups before treatment (t-test) using instrument - if not statistically significant, then randomisation has worked

What are sources of potential bias in (short) OLS regressions

Confounders (could be -ve or +ve OVB) Reverse causality (direction determined by seeing if regressed relationship had coefficient 0, then what sign would reverse causality impose?) Measurement error - classical in regressor causes attenuation bias always towards 0

Overcoming IV confounders

Control for all IV confounders (hold fixed in regression) in first & second stages (same way main effect confounders are controlled for in OLS)

How would mismeaured control affect estimate of B1

Control is intended to eliminate OVB, but if large proportion of its variation is due to random error, then may no longer capture effect of confounder, so bias in estimate of B1 remains

Reasons to add covariates

Control variable used to reduce selection bias (control for confounder when held fixed) Uncorrelated covariate to predict Y (but not X) to lower SE Different treatment from Di Characteristic of treated population to explore heterogenous treatment effects with an interaction term

Performing an F-test

Count number of restrictions given in Ho Estimate unrestricted (baseline) model & restricted model that imposes that null hypothesis is true Calculate sum of squares residuals from each F-stat = [(SSRrestricted - SSRunrestricted)/q]/[SSRunrestricted/(n-k-1)] where k-1 = number of parameters in unrestricted model Get p-value

How does weak first stage affect Var(Xi) & s.e.(B1)?

Cov(xi, zi) almost = 0 In first stage, Xi almost = constant as coefficient on instrument is so small This means Var(xi) is very low & since denominator in s.e. formula, estimates have large s.e. and are very volatile

How does a weak first stage regression cause volatile estimates?

Cov(xi, zi) almost = 0 So dividing by very small number, so for small changes in Xi, estimate could go from (barely) +ve to (barely -ve), so estimates are unreliable

When using IV to solve simultaneity, how does exogeneity work?

Cov(zi, ui) = 0 where ui is error term in equation with regressor instrumented by zi which will be held fixed (line will not move by ui)

How does exogeneity (random assignment) assumption relate to how IV solves issue of simultaneity?

Cov(zi, ui) = 0 This must hold for instrument to hold one of the lines fixed as they move by variations in ui (so only other line moves by error term)

Uncorrelated covariates

Covariates for which the coefficient in the long regression =/= 0, but coefficient in auxiliary regression = 0, thus they are correlated with the outcome, but not with the variable of interest/treatment, thus the OVB formula has Bs = B since the bias = 0 (as multiplied)

Seeking causality in regressions

Create a setting in which the variable of interest is as good as randomly assigned (no selection bias due to confounders) by controlling for all possible confounders (holding fixed)

Stata command for DiD regression

Create binary variables for before & after, treatment & control, & interaction term: gen after = year >=..... gen treated = region == gen treat_after = after*treated reg Y treated after treat_after, robust, if region == "treated region" (or could do summary stats & subtract)

How to identify direction of bias caused by non-classical systematic measurement error in regressor

Create new variable for mismeasured variable (with correct sign on + or - error term) Sub into regression & see how mismeasurement changes at different values of regressor (treat it as confounder)

Stata commands for regression discontinuity

Create variables: gen var = var - D gen var = var >= D gen interaction reg Y varlist, robust, if inrange(var, ...., .....) defining window around threshold (D)

Impact of sample selection: data missing based on regressor cutoff

Data are missing based on cutoff value of regressor This reduces sample size (n) & reduces variance of regressor, so SE increases (decreasing denominator both times) so estimates are less precise This does not induce bias (same B on average)

Impact of sample selection: data missing based on outcome cutoff

Data are missing based on the cutoff value of outcome Reduces sample size (n) which increases SE (as denominator is smaller), so estimates become less precise This induces bias, so slope changes (true ui varies depending on value of X since slope is further from some points than others), so since true ui is correlated with X, this induces bias

Panel data

Data on several individuals with each individual being observed in many time periods

Influence of points of different distances on regression line slope

Data points far from mean of X (outliers) have large influence on regression slope Data points close to mean of X have little influence on regression line slope Standard error formula dictates that observations far from mean are more informative as they cause SE(B) to decrease (more variation in Xi, which is the denominator in the formula)

When to use different estimators with panel data

Default = fixed effects model & include time fixed effects First difference estimator is better if T<10 (gives more reliable estimates)

Standardising variables

Defining X = (X - MEANx)/SDx or Y = (Y-MEANy)/SDy To quantify B as change by 1 SD Can be used to compare across groups (testing external validity) if standard deviations are similar (shift in mean does not affect standardisation)

Why might demand elasticity estimates with IV not operate in price region of elastic demand for cartels?

Demand elasticity may not be constant across line, so it may be an average of elasticity when cartels are in operation (higher prices) & when they are not operating (competitive prices), so cartels may actually only operate where e > |1|

Fixed effects estimator

Demean data for each individual (e.g. Yit - meanYi, ai - meanai, Xjit - meanXji) ai - meanai = 0 as constant over time Rewrite regression equation with demeaned quantities

Data shown in describe command in Stata

Describes what variable names mean (with units)

Differences-in-differences estimator & explanation

DiD = Ytreatment, post - Ytreatment, pre - (Ycontrol, post - Ycontrol, pre) (After - before in treated group) - (after - before in control group) Eliminates: Effects of time (time trends) Individual differences between treatment & control groups (confounders) To create quasi-experiment as if treatment was randomly assigned using time periods before & after treatment to isolate effect of treatment

DiD assumption

DiD assumes parallel trends - effect of time is same in both treated to control group If treated group was not treated, both groups would have same change in Y (same slope, parallel shift)

What is selection bias?

Difference between calculated estimate & true causal effect Difference in potential untreated outcomes between those who were treated and those who were not treated

Omitted Variable Bias (OVB)

Difference between long & short regression coefficients OVB = Bshort - Blong or OVB = coefficient of variable of interest in aux X coefficient on omitted variable in long Represents the direct effect of omitted variable on outcome (holding fixed regressor of interest) multiplied by the correlation between omitted variable and treatment (confounder)

B3 (interaction term coefficient) interpretation in RD

Difference in association of xi with yi for treated regions compared to control regions

Threats to external validity

Differences between & heterogenous effects for each group, e.g. general equilibrium effects due to heterogeneity across groups, so other factors influence outcomes across different groups (e.g. effect cancels out when scaled up)

Implications of first difference estimator

Differences out any time-invariant quantities, including ai & Bo (constant) as cannot distinguish between different constant quantities Lose the first observation for each individual since there is not previous observation to difference, so number of observations (n) decreases Removes any constant regressor, so cannot estimate coefficients for time-invariant variables (e.g. binary/dummy variables)

Avoiding dummy variable trap

Drop/omit one of the dummy variables or exclude the constant (unusual as including constant automatically estimates difference in means rather than just reporting group means)

ATT formula

E[Y1i - Y0i | Di=1]

ATE formula

E[Y1i - Y0i] = E[Y1i - Y0i | Di=1] + (E[Y0i | Di=1] - E[Y0i | Di=0]) Where E[Y0i | Di=1] - E[Y0i | Di=0] = selection bias & E[Y1i - Y0i | Di=1] = ATT

ATE expectations form

E[Y1i | Di=1] - E[Y0i | Di=0]

No perfect collinearity condition

Each regressor must provide new information, so no independent variable can be equal to the sum of multiples of other variables This would present a problem as a regressor could be completely represented by other regressors already in the equation

Solving problem of perfect collinearity in regressions

Either exclude constant & include exhaustive dummies or Omit one of dummy variables & this will become baseline group, represented by Bo (comparison group)

Regression equations with IV

Equation of interest/Second stage equation: Yi = a + BXi + ui First stage equation: Xi = a + BZi + ui Reduced form: Yi = a + BZi + ui

Method of estimating B2sls

Estimate first stage equation (without residuals) & calculate estimates (effect of instrument on treatment) Plug predicted value for treatment into second stage/equation of interest & estimate B2sls Coefficient on estimated value for treatment in second stage/equation of interest is Biv X first stage equation coefficient So B2sls = reduced form coefficient/first stage coefficient (same as Wald estimator)

Standard error

Estimate for sampling variability

External validity

Estimates created using data from one setting which represent the causal effect in other settings

Identification strategy

Estimation method which overcomes bias (more than just controlling for variables as in OLS) (e.g. IV or differences-in-differences)

With no selection bias, what is statistical property of estimator (expectation of differences between treated & control)?

Estimator is unbiased as in absence of treatment, treated & control individuals would have same outcome of average Expectation of estimate is average treatment effect on treated as ATT = ATE in absence os selection bias

How does adding additional controls affect bias of B1 under non-classical measurement error in regressor

Exacerbates bias as control is correlated with mismeasured regressor (makes bias stronger in same direction)

Exogeneity assumption in IV

Exclusion = instrument only affects outcome through treatment As good as randomly assigned = instrument is uncorrelated with confounders that affect the outcome Eliminates selection bias (which still exists no matter how many control variables are included in regression in some contexts)

Which assumption does the existence of an IV confounder violate?

Exogeneity - exclusion as zi affects Yi through some other variable than Xi, so zi should be included in equation of interest as control causes bias in second stage equation as xi is correlated with zi, but zi is also correlated with confounder, so confounder must be correlated with xi too & affects Yi too so confounder in second stage (causing OVB)

Interpretation of Bo with fixed effects & time fixed effects

Expected Yi for omitted individual in omitted year, when all regressors = 0

Interpretation of ai for individual i (with time effects too)

Expected difference in Yi between individual i & omitted individual, holding fixed controls & year (as ai coefficient is effect of switching from not being individual i to being individual i, holding fixed all regressors - same as switching from being omitted group to being individual i, holding foxed regressors)

Average treatment effect (ATE) formula

Expected outcome of treated group - expected outcome of control group Average difference between treated and control groups

Average treatment effect on the treated (ATT) formula

Expected outcome of treated group if treated (observed) - expected outcome of treated group if untreated (unobserved) Average difference between treated and control given treatment

Selection bias formula

Expected outcome of treatment group if untreated (unobserved) - expected outcome of control group if untreated (observed)

Conditional expectation function (CEF)

Expected value of the outcome conditional on specific value of a variable: E(Yi|Xi = x) (usually used for bivariate data)

F-stat relation to t-stat

F-stat for single hypothesis of single restriction: F = t^2 For single restriction, can do t- or f-test

Test to use when testing multiple hypotheses at once

F-test (as typically, coefficients are not independent)

Type II error

Failing to reject H0 when it is false

How many individuals to assign to treated & control groups when Di is only regressor to minimise s.e.(B1)

Find expression for variance of variable of interest, e.g.: Var(D) = pr(D=1)pr(D=0) Var(D) = pr(D=1)(1-pr(D=1)) take derivative wrt to pr(D=1) & set =0 to minimise so 1/2N should be in each group to minimise s.e.(B) as this maximises Var(D) (denominator)

IV method for simultaneity

Find the instrument which identified the parameter of interest (1 per parameter) Find the reduced form coefficients associated with the instrument (using OLS) Divide those coefficients with the coefficient associated with the outcome of interest in the numerator (as simultaneous, B for each regressor of interest will be inverses of each other)

Can first differences or fixed effects estimators incorporate controls which are unchanging over time?

First differences will difference away this variable, so it won't cause bias, but won't be able to estimate its coefficient Fixed effects won't be able to include it as a regressor as this would violate no perfect collinearity as it is already represented by ai in the model as it is a fixed effect of being individual i, so won't bias estimates as already in model, but cannot estimate specific effect of that time invariant variable

Estimation techniques to overcome bias caused by ai

First differences: Difference in variables in current time period & previous for all individuals & use differences regressors (removes ai & other constants) De-meaning also does similar thing Fixed effects: Create dummy variable for each individual, such that coefficient = 1 for being individual i (exclude 1) so retain estimates of fixed effect of being individual i

Structural equations vs first stage equations vs reduced form equations with simultaneity

First stage equations can be considered to be reduced form equations too since the regressor of interest in one structural equation is the outcome in the other simultaneous structural equation (same form with outcome or regressor of interest on left & instrument on right)

How to test for relevance of instrument

First stage regression with biased variable regressed on instrument - if non-zero & significant, then satisfies relevance

2SLS method with multiple (biased) regressors & instruments

First stages: regress each variable separately on all instruments & other regressors Second stage: Create predicted values from each regression & plug them into a single second stage equation Use B2sls estimator to calculate B estimates

Interpreting fixed effects estimate with dummy variables

Fixed effects estimator allows y-intercept for each individual to vary (with same slope) Estimates for coefficients of dummy variables show the difference in intercepts compared to omitted group Bo + ai is the constant for i (fixed effect)

First difference vs fixed effects

Fixed effects method allows us to estimate fixed effects of different groups & compare them First differences does not have a constant & differences away ai Fixed effects with dummies is core commonly used for simplicity & to retain estimates of ai

When to use egen in Stata

For creating variable which is special function of another variable egen xbar = mean(x) egen x_sd = sd(x) egen x_sum = sum(x) (variable equal to sum of all x values)

When is only time R^2 may be more important than a coefficient?

For first stage regression in IV to show instrument explains enough variation in biased regressor - but significance of coefficient usually suffices

Threats to internal validity

For randomised experiment: Unsuccessful randomisation or For mimicking a randomised experiment with regression & non-experimental data: Not controlling for all possible confounders Including bad controls Having measurement error Simultaneity/reverse causality Missing data

Joint null hypothesis

Ho with at least 2 = signs

What is variability?

How the estimate differs across samples

OLS & IV estimates with simultaneity

IV analysis (2SLS) gives more -ve estimates than OLS as OLS estimates are closer to 0 since it mixes -ve & +ve effects of simultaneous relationship

IV solution vs OLS solution

IV solution is to isolate source of good variation (by using instruments which isolate variation in treatment which is uncorrelated with confounders) OLS solution is to eliminate sources of bad variation (by holding fixed controls) Biv = Bl (from long regression in OLS) which would be unfeasible to calculate given unobserved confounders which cannot be controlled for

Approaching simultaneity questions

Identify the 2 channels through which variation is created in variables (supply & demand) Figure out which channel/equation represents supply & which represents demand by putting scenarios into context

Direction of OVB

If OVB>0, then Bs>B, so Bs has upward bias (overestimate) If OVB<0, then Bs<B, so Bs has downward bias (underestimate) as coefficients are multiplied, if 1 is -ve, then there is -ve bias, both must be +ve for +ve bias

Biv estimate if relevance assumption fails

If Zi is uncorrelated with Xi (Cov(Zi, Xi) = 0), then Biv = B from reduced form/0, so Biv = 0 Meaning instrument creates no variation in treatment, so method fails

Is imposing a linear functional form on a non-linear relationship within a window in RD a problem?

If bandwidth is small enough, polynomial will approximate to linear, but if for whole data or large window imposing linear on non-linear true relationship will cause bias

How might fixed effects bias estimates?

If certain individuals have a higher baseline level of variable, affecting outcome, it may affect how well other related variables affect outcome, so creating OVB, so must include ai in regression & estimate difference between individuals

Impact of multicollinearity on standard errors?

If control is very well correlated with X (& correlated with outcome), residuals in auxiliary regression are almost 0 as most variation in variable of interest is explained by control, so: SE(Bl) < SE(Bs) since denominator in SE in long regression (residuals) are very small, this means that by including a covariate which is highly correlated with other regressors, standard errors increase and precision decreases as we control for most of variation in regressor so have little variation in regressor with which to estimate change in outcome associated with regressor changing

Impact of parallel trends failure on DiD

If effect of time varies across control, & treatment groups, then parallel trends assumption fails - counterfactual outcome is inaccurate Bias = difference between actual (unobserved) counterfactual outcome & theoretical counterfactual outcome (with assumption of parallel trends) DiD estimator is biased by time trends and does not show causal effect of treatment (effect of time does not cancel to isolate true treatment effect)

Implications of exogeneity failing in 2SLS

If exclusion &/or as good as randomly assigned fail, instruments may directly affect outcome &/or instruments are correlated with ui, then regressors are correlated with an omitted variable & there is bias due to a confounder or if exclusion fails, the B estimate is biased as Z affects Y directly as well as through treatment, so the B estimate attributes all variation to variation of instrument through treatment, but also has a direct effect, so B estimate is biased This means that the instrument creates variation in the treatments that is correlated with confounders

Biv estimate if exogeneity assumption fails

If exogeneity fails, Zi is part of error term in second stage as it affects Yi through unobserved confounders (Cov(Zi, ui) =/= 0), so Zi affects Yi thrugh some other mechanism other than treatment & B2 =/= 0 (from B2Zi in second stage equation), so Biv is biased (by =/- B2)

Interpretation of regression outputs with dummy variables

If include constant & omit one dummy variable: a = mean value of omitted group (usually when Di = 0 (untreated)) when all X are 0 B = (holding fixed any other regressors/controls), difference between groups in dummy variable (when Di = 1 (treated))

When can we argue that there is no selection bias?

If individuals in control and treatment groups exhibit similar characteristics it is reasonable to assume there is no selection bias and the control group is an accurate counterfactual - treatment is said to be as good as randomly assigned, eliminating selection bias (treatment is independent of potential outcomes)

Interpretation of B1 with logs in regression

If ln(Xi): B1 is the average change in Y associated with X increasing by 100% If ln(Yi): 100 X B1 is the average % change in Y associated with X increasing by 1 If both ln(Xi) & ln(Yi): B1 is the average % change in Y associated with a % change in X (no X100) (elasticity of Y WRT X)

Classical measurement error in X & Bs/B estimates

If only measurement error is present: The short regression coefficient is closer to true value than long regression coefficient since there is more attenuation bias in the long regression This means there is no selection bias in the short regression (no OVB) so Bs is closer to the true B

Interpretation of regression notation with standardisation

If outcome is standardised: B = average number of standard deviations Y changes by when X increases by 1 If regressor is standardised: B = average change in Y when X increases by 1v standard deviation If both outcome & regressor are standardised: B = average number of standard deviations Y changes by when X increases by 1 standard deviation

Implications of relevance failing in 2SLS

If relevance fails in first stage, coefficients on instruments (with regressor as outcome) will be 0 as instruments do not create variation in treatment Second stage: violates no perfect collinearity as regressor provides no new information beyond controls (which are included in both first and second stages) If relevance nearly fails, instruments have minimal predictive power over regressors, causing large standard errors (variation of regressor (denominator) will be small), so estimates are not precise as the instrument isn't creating enough variation in treatment to provide a precise estimate

Why test same relationship with different functional forms?

If similar results emerge when varying functional form, this means that results do not depend on functional form assumptions & are more reliable

What is unbiasedness & what affects it?

If unbiased, sample mean = population mean or difference between sample average and population mean = 0 Unbiasedness is not dependent on sample size - when samples of any size are created, the average of those samples is the population average

How to determine if a variable would be a good instrument using regression outputs

If variable is correlated with biased regressor (relevance holds) - is it strong first stage? It is correlated with controls from equation of interest? - if not then good instrument as uncorrelated with confounders biasing regressor Is it correlated to outcome before treatment time? - if not, then satisfies exclusion as does not have direct effect on Yi Is it correlated with any other determinants of Yi? - if not, then satisfies as good as randomly assigned

Under what condition is it likely that there are confounders in OLS?

If variable is self-selected, it usually has confounders, so OLS estimate cannot have causal interpretation

In a small sample, is it guaranteed that random assignment will eliminate selection bias?

In a small sample, expected value of outcome of treated if untreated & expected value of untreated when untreated may not be close to average values, so selection bias may be non-zero due to randomness in the sample With LLN, sample averages converge to population averages & selection bias tends to 0/on average selection bias = 0

Defining assumption of no selection bias

In absence of treatment, treatment & control groups would have same outcome on average

Why use multivariate regression?

Includes many controls which are intended to capture effects from all confounders, thus holding these fixed isolates the effect of the variable of interest on the outcome If controls control for all confounders, then interpretation of B can be causal

Dummy variable trap

Including exhaustive dummies for groups as well as a constant violates no perfect collinearity condition as the constant automatically estimates the absence of treatment without including an extra regressor for this group too

Key to RD assumption

Individuals are as good as randomly assigned to side of cutoff as they cannot choose which side they are on - only plausible within small window

Flexibly modelling non-linear effects

Instead of imposing a functional form whose assumptions may be wrong, can create dummy variables for several sets of values of multivalued continuous variable & include dummys in the regression Compare values of Bk to find effect of treatments

Implication of presence of IV confounders

Instrument is not as good as randomly assigned as instrument is correlated with ui if controls aren't included, so violates exogeneity, biasing the IV estimate without controls due to omitted confounder

How do instrumental variables solve the simultaneity problem?

Instrument must create variation in the regressor of interest which happens when the relationship of interest is fixed, so the instrument shifts the other curve while holding the curve of interest fixed so it can be estimated through movements along it - include any controls for relationship of interest from original regression to make sure line of interest is held fixed as any variation in regressor of interest can now be attributed to other simultaneous relationship

How does movement along the curve occur in simultaneity with IV?

Issue is that variation in variables happens through 2 channels & instrument creates variation in one variable through only one channel (supply or demand) without affecting other (simultaneous) relationship (demand or supply) Variation that is created by instrument in these variables now only operates through one channel (supply or demand) & holds that channel fixed, so no more reverse causality

How does OLS (e.g. long, short, auxiliary regressions) isolate effect of variable of interest on outcome in multivariate regression?

It creates a version of the variable of interest which is not correlated with the control variables, therefore is not correlated with any confounders OVB creates residuals which are on average uncorrelated with regressors & allows controls which capture effects of confounders to be held fixed to isolate causal mechanism The long regression coefficient is equivalent to the coefficient from a bivariate regression with a variable of interest which is uncorrelated with confounders

General intuition behind instruments

It is a randomiser - creates variation in biased regressor which is uncorrelated with all sources of bias (OVB, reverse causality, measurement error & attenuation bias) to estimate the causal effect on outcome

Testing for parallel trends

Justified graphically using pre-treatment data If both control & treated regions had parallel trends prior to treatment, it is reasonable to assume that they would have had parallel trends in the post-treatment period in the absence of treatment Can run a regression for time trends in regions: B1 = time trend for control B2 = average difference between treated & control in pre-treatment time period B1 + B3 = time trend for treated If B3 is statistically significant, then treatment & control groups do not have parallel time trends & reject Ho that the difference is equal to 0 B3 = 0 if parallel trends Can never prove parallel trends, but can make reasonable assumption from prior data

Hypothesis testing for different null hypotheses with interaction terms

Let B3 = coefficient on interaction term To test for difference between dummy variable = 1 & = 0 Ho: B3 = 0 To test for dummy variable = 0 Ho: B1 = 0 To test for dummy variable = 1 Ho: B1 + B3 = 0 (Take derivatives for clarity)

T-test for multiple coefficients in multivariate regression by transforming the regression

Let c = b1 - b2 & let Ho: c = 0 sub in b1 = c + b2 into regression & run regression t = (c-0)/SE(c)

Types of confounders

Main effect confounders: confounders which are correlated with both treatment & outcome (Cov(control, treatment) =/= 0) IV confounder: Unobserved confounders which are correlated with the instrument (& outcome) (Cov(Xi, Zi) =/= 0) IV overcomes bias caused by main effect confounders, but not IV confounders (which cause exogeneity to fail & introduce different bias)

What do standard errors meaure?

Measure of how precise an estimate is (degree of randomness = spread in sample means)

What does standard deviation measure?

Measure of how spread out variable is

Classical measurement error

Measurement error which is uncorrelated with data recorded/with outcome (random)

Standard errors for differences in means

Measures of precision of estimated difference Estimates of standard deviation of difference in means

Reduced form estimate explanation

Measures the effect of being assigned/offered treatment = the intention-to-treat (ITT) effect, but there may be non-compliance, so estimate is divided by effect of instrument on treatment (from first stage) to overcome selection bias & non-compliance problems

Does using robust standard errors instead of baseline change B1 estimate or R^2?

Method for estimating coefficients is still minimising RSS, so B1 formula is still: B1 = Cov(Yi, Xi)/Var(Xi) so B1 is unchanged by s.e. method R^2 is a measure of how close points are to the regression line & since still estimating same line, R^2 does not change

Method used in regression to estimate a & B

Minimise residual sum of squares (RSS)/sum of individual deviations from regression line to estimate a & B to best fit regression line through data

Types of missing data

Missing at random (MAR) Missing based on a cutoff of regressor's value Missing based on cutoff of outcome's value

Overidentification in 2SLS (IV)

More instruments than biased regressors = overidentified regression equation (more information than needed & may make exogeneity assumption less plausible, but does reduce SE as creates more variation in treatment)

Implications of overidentification in simultaneity

More instruments than endogenous variables, so will fail to shift other curve & B for other equation cannot be identified

Effects of multicollinearity

Multicollinearity is near redundancy in regressors Causes large SE/less precision in estimates & volatile estimates as estimates vary a lot with small changes in regression equation

No perfect collinearity condition with multiple distinct dummy variables

Multiple dummy variables with same values representing different variables does not violate no perfect collinearity as the dummys are not mutually exclusive & exhaustive

How to show that regressor is saturated

Must have same number of coefficients/parameters (including Bo) as possible combinations/sets of values of regressors So, show all combinations compared to # regressors

Rank condition in IV using 2SLS

Need at least as many instruments as biased regressors Each instrument can only be used to correct for one biased regressor (if rank fails, no perfect collinearity is violated)

Effect of classical measurement error in outcome

No bias in estimates, but standard error increases (var(ui) increases)

No perfect collinearity condition definition

No x variable can be the sum of multiples of other x variables, so provides no new information & is redundant No x variable can be a constant either as Bo represents constant effects

Can controls be used as instruments?

No, as controls are correlated with confounders, so this violates exogeneity assumption & violates no perfect collinearity since using it as an instrument & control will not provide extra information Must not use an instrument which is a component of the baseline (second stage) equation which is being estimated

Implications of incomplete first stage in 2SLS

Not including all instruments & other regressors in first stage causes ui to be correlated with Yi & instruments, so creates an omitted confounder, inducing bias (exogeneity fails) Omitting any instruments from first stages has the same biassing effect MUST INCLUDE ALL REGRESSORS & INSTRUMENTS IN FIRST STAGE EQUATION TO GET UNBIASED B2SLS ESTIMATES, otherwise, estimates will not be causal

t-stat definition

Number of standard deviations from Ho value (0) the estimate is Large absolute value of t-stat is not expected if Ho is true

How does IV estimation solve issue of imperfect compliance?

Numerator of Wald estimator is average change in Yi due to instrument (being offered treatment) Denominator is average change in Xi (whether they are treated or not) due to Zi (being offered treatment) Normalises effect of being offered treatment on Yi by fraction of individuals who are treated (corrects by fraction who complied as they are the people this effect operates through)

First difference estimator

Observe individuals for given time period Define a change in Yit (Yit - Yit-1) between time periods Since ai is a constant/fixed effect across all time periods, it will be differences out, so ai is no longer a confounder & bias is removed First difference equation only contains time-varying variables & error (assumes Bk are constant & first observation for each i is lost)

Short regression

Omits the control variable (which represents a confounder) Outcome of interest with only the regressor of interest (omitting all controls) Regression of the outcome of interest on the regressor of interest

Conditions imposed by OLS

On average, ui should be 0 (otherwise bundled into a), mean-zero residuals as on average, the OLS regression line goes through centre of data If residuals are non-zero, this shifts the OLS regression line vertically since ui is bundled together with a, moving the y-intercept (B remains same) Residuals are uncorrelated with the regressor - COV(ui,Xi) = 0 as residuals are mean-zero on average The regression line passes through the means

Effect of classical measurement error in both regressor and outcome

Only measurement error in regressor will induce bias - attenuation bias towards 0 Measurement error in outcome will increase s.e.

What are the types of potential outcomes?

Outcome (Yi) if treated Outcome (Yi) if untreated Only one outcome is observed for each individual

Effect of classical measurement error in X on SE

Overall effect is ambiguous as both numerator (variance of residuals) & denominator (variance of X including measurement error) increase

Mathematical representation of DiD assumption

Parallel trends E[Ytreated, after (0)] - E[Ytreated, before (0)] = E[Ycontrol, after (0)] - E[Ycontrol, before (0)] Where Yit(0) is potential outcome in i at time t in absence of treatment

P-value definition

Probability of obtaining the estimate or something more extreme (further from 0) if null is true

Values of R^2 for different values of X

R^2 = 1 if all points are on regression line R^2 gets smaller the further points are from the line (as regression line explains less of variation in Y) R^2 = 0 if a constant/flat line fits the data as well as regression line (regression line does not explain any more of variation in Y than flat line)

How to identify multicollinearity in regression output data

R^2 barely increases as new regressor explains almost no new variation in outcome Identify regressor which it almost perfectly predicts and show this relationship Large standard errors may also show this with equation of var(ui) (from short regression) over Var(X~) (residual from regression of X on all other X) as var(X~) will be nearly 0 since regressors almost perfectly predict each other, so standard errors increase

Regression R-Squared

R^2 is the proportion of variance in outcome which is explained by regression model: R^2 = B^2Var(Xi)/Var(Yi) = 1 - Var(ui)/Var(Yi)

Random assignment vs random sampling

Random assignment allows creation of unbiased estimator for treatment effect in samples used - so treatment effects calculated will be representative of those samples Random sampling implies that composition of sample is same as population With both random assignment and random sampling, it follows that treatment effects for individuals in sample are representative of treatment effects for population

Purpose of including uncorrelated covariates (with random assignment of treatment)

Random assignment assures no selection bias & no confounders, so no controls need to be added to eliminate OVB, but uncorrelated covariates reduce standard errors (reducing variance of ui) & to increase R^2 (model explains more of variation in Yi)

Random assignment implications for probability of being in treatment or control group

Random assignment implies that 50% will be assigned to each group

Sampling variation in OLS estimator

Randomness due to sampling causes randomness in OLS estimates as estimate for slope has sampling variation, but as n tends to infinity, the OLS estimates tend to the true population values

Fixed effects estimator with dummy variable implementation

Rather than demeaning each variable, include dummy variable for each individual (except one) Let changei = 1 for individual i & changei = 0 otherwise (so each variable is 1 - value for group i = all relative to excluded group) (exclude one dummy due to dummy variable trap & no perfect collinearity as Bo will represent constant for excluded individual) Then ai is the average difference in Y associated with being individual i compared to being the excluded individual (holding fixed all regressors) - it is the fixed effect of being individual i Comparing against the excluded group (baseline) shows individual fixed effect of being group i is given by ai for that group

Partialling out variables (from a variable)

Regress a variable on other variables (aux reg), create residuals, then run a regression using the residuals (short reg) This means that the slope coefficient estimated in the (short) regression is the same as the true coefficient in the (long) regression (isolated from controls)

What does using robust standard errors change?

Regression line (Bo & B1) are unchanged, R^2 is unchanged t-stat is different as standard error is different

Ordinary Least Squares (OLS) Estimator

Regression line a + BX where a & B minimise RSS: B = Cov(Yi,Xi)/Var(Xi) (slope coefficient) a = E(Yi) - BE(Xi) (constant) Due to FOC, OLS regression line always goes through centre of data

Which variables does instrument affect?

Regressor of interest/treatment (which has biased coefficient) = Xi (in first stage equation) Outcome = Yi (in reduced form equation)

Type I error

Rejecting H0 when it is true

Assumptions instruments must satisfy

Relevance = instrument is correlated with Xi/regressor (which may have biased coefficient) Cov(Zi, Xi) =/= 0 Exogeneity = instrument is correlated with Yi through Xi only (not through other independent variables or ui) Cov(Zi, ui) = 0

IV assumptions with simultaneity

Relevance: Zi must be correlated with the parameter of interest Exogeneity: Exclusion = Zi cannot directly affect parameter of interest, only through regressor of interest which shifts other curve As good as randomly assigned = Zi must be uncorrelated with other conditions determining Xi

Reparameterisation vs functional form

Reparameterising is +/-/x/dividing a constant, so is a linear transformation of data, only changing scaling of coefficients, not functional form Functional form changes are non-linear transformations of data which changes the interpretation of coefficients

Residual vs error

Residual is the estimate for the effect of all other factors on Yi other than regressors Residual is an estimate of the error Residual & error coincide with full population data as there is no sampling variability in estimate of error

Advantages of regression discontinuity

Restrict to observations with similar unobservable characteristics as within narrow window around threshold, so less likely that confounders are biassing the estimate - as good as random assignment of treatment

How does restriction based on cutoff of outcome variable induce bias?

Restricting to certain values of outcome while estimating affect of x on y reintroduces bias as all values of x are still available, so some individuals must have high ui if low x to get into higher restricted values of y, creating a correlation between x and new confounder which biases the estimate of B1

Saturated regression

Same number of parameters (coefficients & constants) for each possible combination of regressors

Saturated regressions & OLS

Saturated regressions always fit CEF perfectly , so OLS line fits data perfectly

Methodology behind IV for simultaneity with supply & demand

See which equation is being estimates initially (demand or supply) - this is the curve to hold fixed with instrument

Which issue does IV solve?

Selection bias (& self-selection into treatment) as it creates a version of Xi which excludes confounders to make treatment as good as randomly assigned

Selection bias vs OVB

Selection bias is difference between estimate of B1 & true causal estimate of relationship OVB is the mathematical difference between regression coefficients in short & long regression Adding more controls will bring B1l estimate closer to true causal value, but confounders may still remain, so selection bias may still exist

Expected selection bias with random assignment of treatment

Selection bias should be 0 so that characteristics of individuals in treated & control groups are the same on average

Should uncorrelated covariates be included in regressions?

Should be included as they 'soak up' variance in residuals but leave variance in regressor of interest unchanged, so gives lower SE(B), giving more precision in estimates since it explains variation in Y which is uncorrelated with X

P-values

Significance level at which null hypothesis would barely be rejected - the probability of observing the estimate or a more extreme value

Under what conditions will long regression have smaller standard error than short regression?

Since Var(ui) </= Var(uis) & Var(Xi) </= Var(Xis) Var(ui) change causes s.e to decrease Var(Xi) change causes s.e. to increase So, when adding a control, if reduction in Var(ui) is large compared to reduction in Var(Xi), then s.e. will decrease

Does classical measurement error in the outcome (Y) induce bias?

Since classical measurement error is uncorrelated with the outcome, it becomes part of the regression error (ui) which reduces precision of estimates by increasing SE, but does not cause bias This measurement error in Y stretches the data (moves points further from line by amount of random error) but does not change the average value of Y for each X, thus not inducing bias in the estimates, so same regression line fits data on average

What kind of bias does data omitted at random in x variable induce in estimates?

Since data is randomly omitted, this creates classical measurement error which is uncorrelated with regressors & ui, but this produces estimates of B1 which are further from true value --- attenuation bias which is always biased down towards 0 compared to true estimate & is exacerbated by included more controls as they are correlated with mismeasured variable, so estimate is even closer to 0

How does IV solve the measurement error problem?

Since measurement error is uncorrelated with instrument due to exogeneity assumption, so the true B is estimated as Zi predicts good variation in Xi, not the bad variation (e.g. measurement error) (valid instrument is an example of second measure of Xi, so both could have measurement error, but since it is uncorrelated, then IV overcomes this bias) - extension of exogeneity assumption Cov(wi, Zi) = 0

IV 2SLS residuals

Since second stage uses estimate of treatment using instrument, not actual treatment value, & has residuals which are uncorrelated with the estimated treatment value (Cov(ui, Xi) = 0), the residuals in the theoretical model (with true treatment value) may be correlated with the treatment As 2SLS does not result in variance decomposition of Var(Yi) (unlike OLS), there is no ANOVA theorem & no well-defined R^2 (may be covariance term for treatment & error)

Determining direction of selection bias

Since selection bias is caused by confounders, which affect the treatment and outcome, then determine direction of bias for each of those relationships & determine overall direction (effect of confounder on x) If confounder has -ve relationship with x & with y, then overall, causes -ve bias If x & y had no relationship, which type of relationship would be observed solely due to confounder?

Data missing at random (MAR) & impact

Some values are randomly not recorded, so MAR does not cause bias since missing data is not correlated with anything in regression Causes lower sample size (n), so larger standard errors (smaller denominator) so less precise, but unbiased estimates

Population standard deviation forumla

Square root of population variance

Population variance formula

Squared difference between sample average and population average

Standard deviations with binary vs multivalued variables

Standard deviations for binary variables will be lower than multivalued variables since they can only take values 0 & 1 so spread from mean is minimal, whereas multivalued variables take many variables so usually have larger spread from mean

standard error regression

Standard error is distance from population value, so small SE(B) indicates little variation in estimates across samples, so increases confidence in estimates Depends on: Sample size n - larger sample sizes give more precise estimates/as n increases, SE(B) decreases (more data = smaller SE(B)/less data = higher SE(B)) Variation in ui - the more unobserved variations in Y, the less precise the estimate is/the higher the SE(B) (low Var(ui) means they are few unobserved factors affecting Y, so it is easier to measure effect of X) Variation in regressor or interest (X) - the more spread out regressor is/the higher the variation of the regressor, the more precise the estimate is/the lower the SE(B) (High Var(Xi) means lots of information about how Y changes with X, so smaller SE(B)/low Var(Xi) means little information about how Y changes with X, so large SE(B))

Why reparameterise regressors/outcome?

Standardising data, e.g. dividing by standard deviation

How does bias from simultaneity work with supply & demand?

Supply and demand curves are represented by the same variables (quantity - supplied & demand, & price) but the curve represent opposite relationships between the two Since demand & supply are jointly determined, if they are both moving simultaneously, then estimation of relationship of quantity regressed on price will be almost a flat line (as they operate in opposite directions) so estimate is biased - need to hold one line fixed to estimate its coefficient

How to identify relationships with outcome with dummy & multivalued regressors in interaction terms

Take derivatives WRT variable of interest & relationship will be represented by a combination of coefficients for individual regressor & for interaction term (added)

How does fixed effects overcome bias from confounder ai?

Takes confounder ai out of error term & includes it directly in the model so it can be estimates & held fixed

Hypothesis tests for balance checks

Tests similarity of characteristics of individuals in treatment and control groups Rejecting null hypothesis of equality of means of characteristics across groups suggests imbalance & randomisation has failed as there is a statistically significant difference in means

Purpose of including alternative treatment in regression as controls

Tests which treatment is more significant in changing outcome as if treatment coefficient is still significant after adding alternative treatments as controls & holding fixed, then more likely to be the causal relationship

Least squares minimisation

The best linear predictor (BLP) of Y given X minimises the expectation of the squared difference from the line to the CEF to produce the OLS regression line Square all individual residuals, sum them & minimise

Residuals

The difference between the point and the line for any a & b, thus choose a & b to minimise the sum of squared residuals The residual is the estimate for the error term, ui (same when using population data) ui = Yi - a - BXi

The 2 definitions of selection bias with maths

The difference in average outcomes between the treated and control groups in the absence of treatment E[Y0i | Di=1] - E[Y0i | Di=0] The difference between the observed difference in outcomes and the causal effect of treatment (E[Yi | Di=1] - E[Yi | Di=0]) - E[Y1i - Y0i | Di=1]

What is bias?

The distance of an average estimate from the population parameter

Time fixed effects

The effect of being time period t - effects of time t that are same for all groups (component of error term (ct)) Can cause bias like ai Create dummy variables for time periods (omitting one time period to avoid dummy variable trap)

Internal validity

The estimate is the causal effect for that particular group/setting

Confidence interval definition

The idea of a confidence interval is that if we repeatedly drew samples and created a 95% confidence interval using each draw of data. The true value would be in 95% of the confidence intervals The set of values for which we don't reject the null hypothesis that the truth is that value

Why use instrumental variables?

The instrument isolates the 'good' variation in the treatment that is free from confounders Instrument must be uncorrelated with anything else in regression which affects outcome so that coefficient quantifies only effect of X on Y for causal interpretation

Bs/B with only selection bias in X

The long regression coefficient will be closer to the true value of B than Bs as in the long regression, confounders are controlled for by holding control variables fixed (Bl = B if controls control for all confounders), whereas in short regression, OVB causes Bs to be further from true B than Bl

Interactions terms

The product of two other variables to explore effect of coinciding variables on outcome Interaction terms allow the association of one variable with the outcome to change depending on the value of another variable (usually represented by final B) Shows that the association between one dummy variable depends on itself changing as well as another dummy variable changing (when either dummy = 0, the interaction term cancels) (must always include main effects individually in regression when including interaction terms containing combination of main effects)

Confidence intervals

The set of all possible null hypothesis values that cannot be rejected in a t-test at that confidence level

Definition of Bo & B1 under OLS

The values that best approximate the conditional expectation function

What is the treatment?

The variable of interest (Di), usually binary

Auxiliary regression

The variable omitted in the short regression as the outcome and the regressor of interest as the regressor Regression of the omitted variable on the regressor of interest

What is homoskedasticity?

The variance of the error term is uncorrelated with X Var(ui) is constant regardless of value of X: Var(ui|Xi) = sigma^2 (constant) Spread from regression line does not change with X

How does simultaneity bias estimates?

There are 2 channels through which variation is created in variables (OLS bundles together both effects)

How does non-compliance in treatment cause bias?

There will be confounders which are correlated with accepting or rejecting treatment and are also correlated with the outcome, so will cause OVB (even if assignment to treatment is random, it is still self-selected)

Why might long and short regression coefficients differ?

This difference represents the correlation of the omitted variable with the treatment (& the subsequent effect of this on the outcome) as confounders are correlated with the treatment and outcome

Judgement if OLS estimate & Biv estimate are similar

This means that OLS estimate was likely unbiased, but using IV verified this (e.g. if there was no selection bias as characteristics of both treatment & untreated groups were similar (t-test = differences were not statistically significant)) Means estimates are robust as they do not depend on assumptions imposed under different methods

How does data missing based on cutoff of outcome cause bias?

This means that ui changes with xi as different values of xi need larger/smaller ui to meet threshold in Yi, so there is omitted variable which is confounder

Implications of fixed effects estimate with dummy variables

Time-invariant variables must be excluded (otherwise they would fail the no perfect collinearity condition) Cannot estimate coefficients for time-invariant variables

Reasons to include control variables

To control for confounders (if correlated with Xi) & reduce bias in estimates To reduce standard errors (& increase R^2) of estimates (if correlated with Yi & uncorrelated with Xi - uncorrelated covariates)

Why use IV?

To ensure B can be interpreted causally, if OLS estimate is likely biased 7 it may be difficult to identify (e.g. unobserved) & hold fixed all controls to eliminate confounders, instruments can be used to isolate the variation in treatment which is uncorrelated with confounders to give an unbiased B estimate

Defining simultaneous relationships with regression

To estimate one curve, hold it fixed & use changes in the other curve to define the first curve & vice versa (plot intersections) to isolate the situation in which only one parameter represents the simultaneous relationship

Testing the regression discontinuity assumption (& Stata commands)

To test if treatment is as good as randomly assigned around threshold: Density (pdf): Check if there are equal numbers of individuals either side of threshold (within window) usually indicative of possibility of self-selection Stata: sum varlist if var >= D & inrange(var, ..., ...) & sum varlist if var < D & inrange(var, ..., ...) Covariate values: If individuals just above & below threshold have similar covariate values for observable characteristics, treatment is more likely to be as good as randomly assigned Stata: using above & look for mean & SD

Window choice in regression discontinuity

Tradeoff: Smaller window makes it more likely that assumption is true, but reduces number of observations & increases variance, so increases standard errors, but reduces bias Larger window makes it less likely that assumption is true, & uses more observations, but decreases variance, so decreases standard errors, but increases bias Want low bias & low variance [Use Silverman's: Window = 1.06 X SDx1i X n^(-(1/5))] Test with many different windows to show robustness of results - show choice of window does not affect estimates

Parallel trends

Treatment effect is the difference between the assumed parallel trend of treatment group if untreated (unobserved) & observed trend (in presence of treatment) - true causal effect of treatment

Regression discontinuity

Treatment is assigned based on another variable being above or below a threshold to create a situation where the treatment is as good as randomly assigned by restricting to observations within a narrow window around threshold Running variable (X1i): x2i = 1 if x1i >/= D x2i = 0 if x1i < D (want to know effect of x2i on y)

Implication of random assignment on covariance

Under random assignment, assume covariance of treated and control outcomes is 0 (random factors affecting treatment are uncorrelated with those of control group)

Random assignment implications for ATE & ATT

Under random assignment, on average, ATT = ATE since there is no selection bias E[Y1i - Y0i] = E[Y1i - Y0i | Di = 1] Average treatment effect on treated is representative of average treatment effect on all individuals in sample

Is it likely that DiD assumption ever holds in reality?

Unlikely to hold in reality due to other differences over time which affect Y Can be justified if parallel trends are exhibited in observed pre-treatment period

Method for estimating first stage & reduced form estimates in IV

Use OLS as they have no confounders, then use these to estimate second stage/equation of interest using IV estimator to get unbiased estimate

How does hypothesis testing change when testing multiple coefficients (multivariate regression)?

Use a t-test & change SE accordingly for t-stat calculation t-stat = [(B1 - B2) - 0]/SE(B1-B2) if Ho: B1-B2 = 0

Testing for whether data is missing at random

Use differences in means of characteristics for people with data missing & not missing If no significant difference between means, then probably missing at random, not systematically

Finding percentage changes in regressions

Use logs Transform Y &/or X by ln in the regression Take derivative WRT X & interpret (scaling of units has no impact when using logs as % change is the same)

How to alter regression if relationship is non-linear

Use polynomial terms (e.g. quadratic) as additional regressors

drop command in Stata

Use to delete data or variables drop in 1/10 (drope observations 1-10) drop if var == x drop if var < x drop var

When to use different standard error formulae

Use var(x) as denominator when Xi is true value (OLS) Use var(x^) fro estimated values (2SLS) Use var(x~) for regressions with controls (for OLS & for IV use var(x^~)

How does 2SLS in IV overcome bias?

Uses estimate of treatment variable from first stage equation, which is the portion of treatment entirely determined by instrument, so is assumed to be as goos as randomly assigned, thus capturing the portion of treatment which is as good as randomly assigned (uncorrelated with confounders) This unbiased estimate of treatment is then plugged into equation of interest, thus estimating unbiased coefficient which isolates the variation in Yi which is uncorrelated with confounders as Zi does not directly affect outcome, so B2sls is just the unbiased effect of Xi on Yi

Estimating B with simultaneity

Using IV that only shifts one parameter (& holds the other fixed) allows for observation of movement along the fixed curve by the other curve (don't know slope of moving curve but know points of intersection with fixed curve so can estimate fixed curve), allowing for identification of the curve which is held fixed by the instrument, so the estimate of Biv = B (for one parameter) so 2SLS creates causal interpretation of B B = reduced form coefficient/first stage coefficient

How does assuming selection bias is 0 allow one to estimate ATT?

Using selection bias formula, outcome of treated group in absence of treatment = outcome of untreated group Then sub in to ATE formula & solve for ATT

Effect of robust standard errors on t-stat

Usually decrease t-stat (make denominator larger)

Variance of of residuals in multivariate regression

Var(X1i) >/= Var(u1i) As the residuals of X1i are a subset of X1i, so their variance must be smaller than the variance of X1i (in short & long regressions) Standard error may be larger or smaller in short or long regression as both numerator and denominator change in opposite directions

How does Var(Ys) compare to Var(Yl)?

Var(Yl) >/= Var(Ys) as Var(uil) </= Var(uis) when adding in a variable to long regression, could assign coefficient of 0 & attain same var(ui) in long regression as had in short regressions, so min value of Var(ui) in long regression can be no larger than Var(ui) in short regression

2SLS standard errors

Var(true treatment value) < Var(estimated treatment value) since variance of estimated value is variance of variation instrument creates in treatment, not entire variation in treatment (denominator), so IV standard errors may be much larger than OLS standard errors also using variance of estimated residuals, not true value (if relevance is weak in first stage, leads to large standard errors as variation instrument creates in treatment is small, so variance of estimated treatment value is low)

Impact of adding regressors on variance of residual & R^2

Var(ui) decreases as the number of regressors increases (must be the same or smaller) This means that R^2 increases as more regressors are added as more of the data is explained by the variation in X than in the variation of ui

Standard error formula to use to explain effect of uncorrelated covariates/multicollinearity

Var(ui) on top for model including all regressors (long) Var(X~) on bottom (residual from regression of treatment on all controls) (almost 0 for multicollinearity, so s.e. increase)

Endogenous variables

Variables determined by the model - describes any regressor that causes bias in OLS If a variable is correlated with error term, it is endogenous

Exogenous variables

Variables determined outside the model (e.g. Zi) If variable is uncorrelated with error term, it is exogenous

Which qualities determine good controls?

Variables which are determined prior to treatment & which are unaffected by treatment Variables which can be used as proxy for confounders

Good controls

Variables which capture a confounder (which is held fixed), reducing selection bias without introducing any new confounders Normally variables which are determined prior to treatment or characteristics that aren'e changed by treatment (uncorrelated with treatment)

What is heteroskedasticity?

Variance of error term is correlated with X Var(ui) is conditional on value of X: Var(ui|Xi) = f(Xi) Spread from regression line changes with X

What does sampling variance of sample average depend on?

Variance of underlying variable, Yi Sample size, n

Regression ANOVA Theorem

Variation in Y are caused separately by variation in X and variation unrelated to X (through ui): Var(Yi) = Var(BXi) + Var(ui) Var(Yi) = B^2Var(Xi) + Var(ui)

Effect of weak 1st stage relationship on standard errors

Weak first stage regression indicates relevance breaks down & instrument creates little variation in treatment, so residuals from regression of treatment on all controls indicates small residuals as residuals represent effect of instrument on treatment & controls almost perfectly predict treatment This is denominator id s.e. equation so estimate of coefficient on treatment is large & coefficient is no longer significant This creates a multicollinearity issue as controls are so highly correlated with treatment in 2nd stage as instrument creates such little variation in treatment in 1st stage, there are also high standard errors for all other coefficients (compare to s.e. in OLS regressions without instrument to see difference even though OLS estimates are biased, use s.e. difference

When does selection bias exist?

When assignment of treatment is not random - assignment to treatment and control groups is correlated with the outcome through a mechanism other than the treatment, meaning that counterfactuals may not be accurate as in the absence of treatment, the treatment and control groups would still differ (e.g. due to confounders)

When is an estimate significant?

When estimate is large relative to standard error

Multicollinearity

When regressors are highly correlated with each other - arises when variables almost violate no perfect collinearity (control almost perfectly predicts regressor)

When does multicollinearity become a problem & solutions?

When there is multicollinearity between controls & the regressor of interest as this produces large SE(B) Solutions: Drop some controls Accept larger SE if need all controls

When will two regression lines for same variable with different dummy values have same slopes (parallel)?

When there is no interaction term as the slope is the coefficient on the xvar, so same for both lines Slopes are different when there is an interaction term with xvar as this changes slope depending on if dummy = 0 or = 1

Just identified in IV with simultaneity

When there is one instrument for each endogenous variable (which are causing bias), the simultaneous equation model is just identified or exactly identified, then B for both equations can be identified by estimating both reduced form equations using OLS, then dividing or by using 2SLS applied to each structural equation

Under what circumstances are confounders likely to occur?

When treatment is not randomly assigned & particularly when treatment is self-selected into (choice)

When to use log transformations in regression

When variables are (right) skewed, log transformations make the variable more normally distributed which makes the relationship more linear

Calculating y-intercept for RD graph

When xvar = 0 usually Bo + B1(-threshold)

Steps in evaluating possible controls

Which confounders do these controls likely capture? Is it a bad or good control? In what manner does control variable control for confounders? (-vely or +vely using OVB formula)

How to identify if missing data will cause bias

Why is data missing? If missing due to cutoff in outcome - estimates are biased If missing due to cutoff in regressor - estimates are unbiased If missing at random - unbiased estimates

With full population data, does OLS define B1 as true causal effect of X on Y?

With full population data, OLS calculated true values of Bo & B1, but these are not necessarily causal as there may still be confounders

When is Wald estimator used?

With single regressor & single binary instrument

Interpreting non-linear regression functions

Write the equation in the form: y = f(x) (already have) Find the derivative WRT x (dy/dx) Use the fact that change in y = dy/dx X change in x Solve for change a y associated with change in x

Reduced form equations in simultaneity definition

X1 = a + B1Zi + B2X2 + ui Regressor of interest (or outcome of interest) = variables that do not cause bias Reduced form equations express endogenous variables in terms of the constants, exogenous variables & error terms

If controls from equation of interest are left out of first stage equation, will this cause bias in second stage?

Yes In first stage, if control is left out, is becomes part of error term in first stage & when predicted values are plugged into second stage, this error term will end up in error term, but if instrument is also correlated with it, then estimate of Xi will be correlated with unobserved determinant of Yi & it becomes a confounder, causing OVB

Regression discontinuity form & interpretation of coefficients

Yi = Bo + B1(x1i - D) + B2x2i + B3[(x1i - D) X x2i] + ui Subtract threshold from running variable so B2 is change in Yi when x2i changes from 0 to 1 (defines the jump, otherwise hard to interpret this) - coefficient of interest as shows effect of having variable equal to threshold B1 = change in Yi associated with x1i increasing by 1 when x1i < D (below threshold) B1 + B3 = change in Yi associated with x1i increasing by 1 when x1i >/= D (when x2i = 1) (above threshold) B3 defines how slope changes above D (slope = B1 + B3)

Interpreting coefficients with dummy variables in regression

Yi = a + BDi + ui E(Yi|Di = 1) = a + B(X1) E(Yi|Di = 0) = a (+ B X0) If untreated, Di = 0, then mean = a If treated, Di = 1, then mean = a + B, which is difference between means for treated & untreated groups (effect of treatment)

Definition of elements of regression equation

Yi = a + Bx1i + yx2i + ui Yi = outcome of interest a = expected Yi if x1i and x2i are 0 (y-intercept/constant) B = average change in Yi when x1i increases by 1, holding x2i constant (coefficient) y = average change in Yi when x2i increases by 1, holding x1i constant ui = effect of all other factors on Yi (error term/residuals) Yi is the dependent variable x1i and x2i are regressors/independent variables x2i is usually a control variable which represents the effect of a confounder & is 'matched' by holding fixed

Regression equation form

Yi = a + Bxi + ui

Regression equation for testing for parallel trends before treatment

Yit = Bo + B1Beforet + B2Treatedi + B3(Beforet X Treatedi) + uit partial derivation wrt before gives B1 + B3(Treatedi) So B3 estimates differences in time trends of Yi between treated & control region Perform t test with Ho: B3 = 0 & if t-stat significant, then no parallel trends

DiD in regression form & interpretation of coefficients

Yit = Bo + B1Treatedit + B2Postit + B3(Treatedit X Postit) + uit where Treatedit = binary variable with value 1 for being treated Postit = binary variable with value 1 for being post-treatment Treatedit X Postit = interaction term taking value 1 for being treated & post-treatment Bo = average Y in before period for control group B1 = pre-treatment average association with being treated group compared to control group (quantifies effect of individual differences) B2 = average change in Y associated with being in post-treatment time period compared to pre-treatment time period (quantifies effect of time) B3 = change in Yi after treatment (causal effect of treatment) (DiD estimator)

Role of IV in simultaneity

Zi represents a binary/dummy variable for some variable which causes the regressor to be held fixed (=0) to allow one of the parameters to be held fixed to map out movements along the fixed curve by the changes in the other curve to define that fixed curve using different points of intersection on the fixed curve to define the fixed curve (IV chain reaction)

Confidence interval formula

[estimate - (1.96 X s.e.), estimate + (1.96 X s.e.)]

Referencing Bo & B1 in calculations in Stata

after running regression _b[_cons] = Bo b[_var] = B1

Types of confounders with panel data

ai (time-invariant error) can induce bias as a confounder = an unobserved effect/fixed effect Individual level-effect correlated with a regressor will cause regression to have bias due to a confounder (assume that uit is uncorrelated with regressors of interest)

Components of error term with panel data

ai = time invariant effect of being individual i uit = time varying error representing unobserved factors that change over time and affect Yit

How does first differences overcome bias from confounder ai?

ai is constant over time, so using differenced variables means they won't be affected by this confounder Uses variation over time in regressor which is uncorrelated with ai (using OLS)

Stata commands for locating different types of data

cd for .dta insheet for .csv

Calculating correlation in Stata

corr var var var

Stata command for covariance

corr var1 var2, cov

How does correlation coefficient between Yi & Xi relate to R^2 in regression of Yi on Xi?

corr^2 = R^2

Count command in Stata

counts number of observations satisfying a condition count if var != 1 & var </= 10

Command to make worded data into number data in Stata

destring destring var, replace force

Interpreting % coefficients >0.2 in Stata

display 100*(exp(_b[var]) - 1)

Stata command for performing calculations

display a +/-/*/ b

Stata command to generate single panel_id for each i

egen panel_id = group(var var) then can do xtset panel_id timevar

Stata command for standardising variable

egen var_std = std(var)

Stata command fro standardising several variables at once

foreach x of varlist var var var { egen 'x'_std = std('x') } creates loop through list of variables & { & } denote beginning & end of loop can then do: reg y varx, robust, if varx2 == "'x'"

Generating differences variables in Stata for DiD

gen diff_x = x - x[_n-1]

Stata command for generating variable in exponentials

gen exp_var = exp(var/1000)

Stata command for generating variables in logs

gen lnvar = ln(var)

Stata command for creating histogram

hist var, freq xtitle(" ") ytitle(" ")

Restricting data to certain worded variables in Stata

if inlist(var, data name, data name)

Restricting data to certain numerical values in Stata

if inrange(var, lower lim, upper lim)

Using 2sls in Stata

ivregress 2sls y a (d = zi), robust where y = outcome a = controls d = biased variable(s)/treatment(s) zi = instruments

Stata command for t-test involving many coefficients

lincom e.g. lincom x1 - x2 find t-stat/p-value in table

Data shown from list command in Stata

list each row of data can restrict data, list var var var in 1/l or 1/10 for all data or first 10 observations or list var var if var == 1 & var </= 10 list m* means list all variables starting with this letter

Stata command for predicted values of variables

must run regression first to give Bo & B1 predict varhat

Residual sum of squares (RSS) formula & minimisation

nE[(Yi - a - bXi)^2] Then, take partial derivatives WRT a & b, set equal to 0 & divide each size by -2n, solve to find a & b which minimise RSS

Impact of reparameterising regressor on regression (+/- constant)

new B = B (correlation is unchanged) new a = old a + AB (where A = constant difference from old X) Slope remains same, but line shifts vertically as a (y-intercept) changes Standard error for B is unchanged

Impact of reparameterising outcome on regression (+/- constant)

new B = B (unchanged) new a = old a + A (where A = constant difference from Y) Slope remains same, but a (y-intercept) changes, so line shifts vertically Standard error for B is unchanged

Impact of reparameterising outcome on regression (multiplying/dividing by constant)

new a = Aa new B = AB Both slope and a (y-intercept) change Standard error of B is multiplied or divided by A (proportionally)

Impact of reparameterising regressor on regression (multiplying/dividing by constant)

new a = a (unchanged) new B = old B/A (where A = multiplied constant) Slope gets steeper/shallower, but a (y-intercept) remains the same Standard error of B is divided/multiplied by A

Stata command for predicting residuals & finding mean

predict residual, resid sum residual (includes mean) or display mean(residual)

Which command must be run before scatter command in Stata

predict yhat

Stata command for testing joint hypothesis

reg command first F-test: test (var1 = var2 = var3) or test (var1 = var2) (var2 = var3)

Stata command for running regression with 2 dummies

reg var....., robust nocons nocons = removes constant so that only Bk are reported (Stata will automatically omit dummy otherwise and give constant)

Stata command for including dummy variables in regression

reg y i.var, robust if specific value dummy takes is unimportant otherwise gen dummy = var == 2

Stata command for predicting Y

reg y x predict yhat

Stata command for regression to check for parallel trends before treatment in RD

reg y x1 x2 interaction, robust, if after == 0

Stata command for regression output in Word table

reg y x1 x2, robust outreg2 using table.doc, replace sdec(3) bdec(3)

Stata command for renaming variables

rename currentname newname

Stata command to replace missing data point with .

replace var = . if var == 0

Stata command for replacing parts of data in variable

replace var = regexr(var, "XXX", "yyy") where XXX is part to replace & yyy is replacement e.g. removing comma replace var = regexr(var, ",", "")

Stata command to use for null hypothesis with difference between coefficients

run reg command first lincom var1-var2 or create new regressor: gen var3 = var1-var2 reg command with var3 instead of var2 ttest Yi, by(var3)

Stata command for creating simple scatter graph

scatter yvar xvar

Sort command in Stata

sort var var rearranges order of data in variables based on data values

Stata command for splitting variables based on location of spaces

split varname

Stata regression command for fixed effects with panel data

start with xtset to show panel data xtreg varlist, fe fe for fixed effects use i.year in varlist of xtreg for time fixed effects

Stata command to find percentiles

sum var, detail tab x if var == r(p25)

3 methods to check statistical significance

t-stat compare to 1.96 (if |t| > 1.96, reject Ho) P > |t| compare to 0.05 (if P < 0.05, reject Ho) Confidence interval (if Ho value (0) is not in interval, then reject Ho)

Do linear transformations of B change t-stat?

t-stat remains the same as both the B estimate & s.e. are transformed by same value

Test to use when testing for multiple coefficients at once

t-test

Stata command for tabulating data

tab var var, col works best with multiple dummy variables as shows relationship for all values of variables

f-test Stata command

test varlist if Ho = 0 otherwise test (variable = ...)

Stata command to turn number variable into worded data

tostring tostring var, replace

Stata command for creating multiple histograms for (dummy) variables

twoway (hist vary if varx == 1) (hist vary if varx == 0)

Stata command for creating graph to check for parallel trends before treatment for RD

twoway (lfit y x if treated == 1 & after == 0) (lfit y x if treated == 0 & after == 0)

Stata command for scatter graph with regression line

twoway (lfit yvar xvar) (scatter yvar xvar)

How does ui from OLS compare to true effect of all other factors on Y?

ui = yi - Bo = B1xi OLS estimate for ui may not be same as ui value with true values of Bo & B1 as OLS approximates the conditional expectation function, whether there is population or sample data

Stata command for using dummies in regression without generating dummies manually

xi: reg y x1 i.x2, robust includes dummies for all possible values of x2 (except 1 to avoid dummy variable trap)

Fixed effects & time fixed effects in Stata

xtreg y x i.group i.time_id, fe robust

Stata command to indicate panel data

xtset panelvar timevar


Conjuntos de estudio relacionados

Finance Foundations - LinkedIn Learning Final Exam

View Set

Leifer NCLEX Review Questions CH 1-8

View Set

Environmental Science Chapter 5 MC

View Set

Chapter 4: Life Insurance Policies - Provisions, Options and Riders

View Set