12
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
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.
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 ...
8
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
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 ...
7
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/...
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
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
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
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. ...
6
votes
Accepted
How to prove that Adjusted R^2 is less than R^2
$$
SSRes=\sum_{i=1}^n\left(
y_i-\hat y_i
\right)^2\\
SSTotal=\sum_{i=1}^n\left(
y_i-\bar y
\right)^2
$$
$$
R^2=1-\dfrac{
SSRes/(n-1)
}{
SSTotal/(n-1)
}
$$
$$
\bar R^2=1-\dfrac{
SSRes/(n-k)
}{
SSTotal/(...
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
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
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},$$
...
5
votes
Accepted
Test which functional form that best explains data
Notice that:
$$
y = \beta_1 x_1 + \beta_2 age + \beta_3 age^2
$$
is a more restrictive model than:
$$
y = \delta_1 x_1 + \delta_2 D_{45} + \delta_3 D_{46} + \ldots
$$
where you have a dummy for every ...
5
votes
Accepted
Is program evaluation (DiD, RD) a structural estimation?
I skimmed through the slides you linked.
I think professor Haile in these slides is trying to introduce the concepts of "structural" and "reduced-form" models in a very broad sense....
4
votes
Partial R2 and contribution of Regressors
I'm a little baffled by your question. I've made a simple simulation, data attached:
...
4
votes
Robust Standard Errors in Fixed Effects Model (using Stata)
I'm still not sure if I'm doing something wrong. However, it is useful to note that I get the same results in R.
...
4
votes
More complex than simple and multiple regressions?
For a list of methods used in applied econometrics you can take a look at the ReplicationWiki (that I work on). Many of them have data and code so you can easily try them out. (The example is with ...
4
votes
Accepted
Regression with weights
If you check Stata's help file on regress you should understand how to do it. Particularly pp. 16-7 have specific examples of how to apply weights.
I will edit in order to be more detailed.
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
regression × 326econometrics × 185
statistics × 36
applied-econometrics × 35
paneldata × 28
time-series × 16
fixed-effects × 16
macroeconomics × 15
r × 15
stata × 14
elasticity × 12
difference-in-difference × 11
microeconomics × 10
labor-economics × 9
instrumental-variable × 9
endogeneity × 9
causality × 8
self-study × 6
variance × 6
data × 5
mathematical-economics × 4
reference-request × 4
economic-growth × 4
international-economics × 4
wages × 4