11
votes
Accepted
Outputting Regressions as Table in Python (similar to outreg in stata)?
You can use code like the following (making use of the as_latex function) to output a regression result to a tex file but it doesn't stack them neatly in tabular form the way that outreg2 does:
...
10
votes
Accepted
What happens if the "control variables" are also endogenous?
"But if any of these control variables are endogenous to some omitted variable, doesn't this contaminate the unbiasedness of ALL the independent variables?"
I don't want to emphasize this too much, ...
10
votes
Proof coefficient in log-log model is equal to coefficient of elasticity
Because $\Bbb E[\varepsilon \mid x]= 0$ is one of the key assumptions for the estimation.
9
votes
Accepted
More complex than simple and multiple regressions?
Welcome to the wonderful world of econometrics! Most introductory econometrics courses will extend Ordinary Least Squares (OLS) by considering binary outcomes models such as the logit and probit.
...
9
votes
Accepted
Alternative way of deriving OLS coefficients
The $\mathbf M = \mathbf I-\mathbf X(\mathbf X'\mathbf X)^{-1}\mathbf X'$ matrix is the "annihilator" or "residual maker" matrix associated with matrix $\mathbf X$. It is called "annihilator" because $...
8
votes
Accepted
What R-squared is a low R-squared?
Disclaimer: this answer comes from a microeconomic research perspective. Time series / macroeconomic specialists will likely have other perspectives.
There is no general rule for what's too low ...
7
votes
Alternative to linear regression
There are numerous directions to go which start moving you beyond ordinary least squares (OLS), linear regression. The universe of statistical methods is large!
Two books that I particularly enjoyed ...
7
votes
Accepted
Why we need to control for the interation of year and industry fixed effects?
When you control for not just year fixed effects but instead year-region or year-industry it adds flexibility.
The year fixed effects controls in a flexible manner for the time-trend and is more ...
7
votes
What should we do if the subsample have the opposite results to the general results?
This sounds like a case of Simpson's Paradox. Did you control for fixed effects?
You might also have heterogeneity - there may be different results in developing vs developed countries.
Generally, it'...
6
votes
What happens if the "control variables" are also endogenous?
All is too strong, but probably some. This problem is called "smearing". Take a look at the proof in Greene's lecture notes on slide 5.
Emily Oster has a nice working paper (and Stata command ...
6
votes
Is a hedonic regression a reduced-form?
In the benchmark hedonic price analysis, we assume a utility function of the general form
$$U = U(x, z_1,...,z_n)$$
where "$x$" stands for the composite good, and $(z_1,...,z_n)$ are the ...
6
votes
Outputting Regressions as Table in Python (similar to outreg in stata)?
You can use the stargazer package (install with pip install stargazer).
From https://github.com/mwburke/stargazer/blob/master/...
6
votes
Accepted
Including (demand) price elasticity in a price regression model
The incorporation of a price elasticity in your regression requires that your dependent variable, quantity, be logged as well.
Take an example of a basic demand side equation including two ...
6
votes
Accepted
What is a good proxy for government quality?
Using corruption is part of it but a bit restrictive way to measure government "quality". You may use aggregate indicators as the one developed by the Worldwide Governance Indicators (WGI) project ...
6
votes
Accepted
Is this an an endogeneity/simultaneity problem?
Let us consider Situation 1.
Let us assume that $\rho$ is observed. If it does not work when $\rho$ is observed, there is no reason why it (using a proxy of $\rho$ as instrument) should work when $\...
6
votes
What should we do if the subsample have the opposite results to the general results?
tldr: As the other two answers also indicated, there is not necessarily a problem with your results. It might be the case that the two subgroups have different distributions of the covariates. ...
5
votes
What happens if the "control variables" are also endogenous?
This is an example of what statistician Andrew Gelman calls "the fallacy of controlling for an intermediate outcome". Here is his description of this fallacy popping up when researchers ask if having ...
5
votes
What happens if the "control variables" are also endogenous?
In the context of Least-squares estimation, the way we have to (attempt to) deal with possible endogeneity of regressors is through Instrumental Variables estimation. This approach does not depend on ...
5
votes
rotating and exchanging x for y's in regression
This is a somewhat "dated" subject in introductory econometrics, I suspect because, in econometrics the models come from theories and arguments that try to a priori establish causality and not just ...
5
votes
Robust Standard Errors in Fixed Effects Model (using Stata)
Use -areg- in Stata, and the standard errors will come out as in the textbook. Specifically, the command
...
5
votes
How do I calculate price elasticity of demand using historical price and quantity data?
You've fallen into a really common pitfall -- the spurious regression. The parameters you chose to include can't be chosen 'willy nilly' by throwing data into a regress command. Ultimately this can't ...
5
votes
Outputting Regressions as Table in Python (similar to outreg in stata)?
There is now a Python version of the well known stargazer R package, which does exactly this.
See also this related question: https://stackoverflow.com/q/35051673/2858145
5
votes
Regression on a constant
So basically the question is:
If I know the average ($\hat{\mu}$) of the daily temperatures ($y_i$) of last year, does that tell me anything about how many people were born ($x_i$) each day?
...
5
votes
Regression over the whole population
It's important to consider what exactly the population is about which an inference is being drawn. It's easy to overlook the time aspect in this context.
Suppose for example that the aim is to ...
5
votes
Accepted
Does the linear probability model require the regressand to be zero/one-valued?
The "LPM" label refers to the structure of the equation, not to the estimator. LPM models can be estimated not only by least-squares methods but also by maximum-likelihood for example.
As regards ...
5
votes
What's the use of '% to GDP' type of variables?
Imagine that I am trying to determine whether eating corn has any effect on your height. I see that in the US, total corn consumption is 20 million tons per year (made up number, all others will be ...
5
votes
How to find $\phi$, that denotes the correlation of signals among informed traders?
A degenerate joint normal is distribution is one in which you cannot find a PDF for the distribution. They assume you can. (The covariance matrix is invertible).
Let $f(s_1,s_2\dots,s_n,v)$ be the ...
5
votes
Accepted
What should we do if the subsample have the opposite results to the general results?
I'd interact the regressor you are interested in with a dummy for the country being developed and see what happens. Its entirely possible that the mechanisms at play in developed contries are ...
5
votes
Accepted
How to recognize correlation in spurious regression case
Just regress Y on X:
$$Y=b_0+b_1X+ e$$
and you will likely find some negative significant $b_1$ coefficient even though both series are just unrelated random walks.
You can also see that as one series ...
5
votes
Nonlinear Least-Squares Estimation in Practice
Suppose the relationship between $y_{i,t}\equiv\log w_{i,t}$ and $z_{i,t}\equiv\left(s_{i,t},j_{i,t},e_{i,t},x_{i,t}\right)^{\top}$ is given by
$$y_{i,t}=g\left(z_{i,t}\right)+\varepsilon_{i,t},$$
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
regression × 259econometrics × 148
statistics × 33
applied-econometrics × 27
paneldata × 21
fixed-effects × 14
macroeconomics × 12
r × 12
elasticity × 11
stata × 11
time-series × 10
labor-economics × 9
endogeneity × 8
microeconomics × 7
instrumental-variable × 7
difference-in-difference × 5
logit × 5
economic-growth × 4
self-study × 4
international-economics × 4
wages × 4
empirical-methods × 4
reduced-form-estimation × 4
reference-request × 3
price × 3