Hot answers tagged

15 votes

R in econ departments?

In my university the choice of program is considered generally irrelevant. We focus on results, and it is up to each student to determine which program is best suited for the task and user preference. ...
user avatar
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: ...
user avatar
  • 15.9k
8 votes

R in econ departments?

If you are only looking for "A department where at least few researchers use R? ", I believe you should be able to find plenty. In my department (Vanderbilt University), I can count at least ...
user avatar
8 votes
Accepted

Will excluding the intercept affect other variables' coefficients?

Running an (OLS) regression with or without intercept will not change the other coefficients of the other covariates if the means of (all) these covariates are zero. For simplicity, consider the case ...
user avatar
  • 8,737
7 votes
Accepted

Papers that use R vs Stata

The main economic journals are slowly starting to require authors to make their data and the code of their analysis available as part of the online appendix. When this is the case, it is easy to ...
user avatar
7 votes

R in econ departments?

Basically it's better to use the software your PI uses! First (s)he will be able to correct your code. Second, if you're a TA for a class using one software, it's better to handle it... To find the ...
user avatar
  • 698
7 votes

Python vs R (vs Stata): the old battle revisited

I use all three programs. Python can do everything that R can do and R can do everything that Python does, but I must say R is superior to Python when it comes to the packages. For that reason for ...
user avatar
  • 41.5k
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/...
user avatar
6 votes
Accepted

What are the main differences among xtreg, areg, reghdfe?

xtreg xtreg is a general command for panel regression. The panel regressions will have the following general form (see stata manual): $$y_{it} = α + \mathbf{x_{it}β}...
user avatar
  • 41.5k
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
user avatar
5 votes

Papers that use R vs Stata

See RePEc's software top. You'll find much Stata, a bit Matlab, and nothing else. From long personal observations, economists' preferences are ranked like this: Stata (none) Matlab Python, R SAS, ...
user avatar
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 ...
user avatar
5 votes

How to average CDFs of one variable across years

Why don't you just take a weighted average? Suppose you have ten years $t \in \{1,...,10\}$ and year $t$ has $N_t$ observations such that in total you have $\sum_t N_t=N$ observations. Let the year-$t$...
user avatar
  • 5,090
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. ...
user avatar
  • 9,107
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. ...
user avatar
4 votes

How to average CDFs of one variable across years

The answer by @Baysiean proposed to compute a weighted average of the per-period empirical distribution functions $EDF_t(w)$ (where $w$ is the value in the support of a random variable $W$), a value ...
user avatar
4 votes
Accepted

What does chi p(q) mean?

This is most likely a $\chi^2$ distribution with a degree of freedom of 3. From Wikipedia: In probability theory and statistics, the chi-squared distribution [...] with k degrees of freedom is the ...
user avatar
  • 26k
3 votes

Robust Standard Errors in Fixed Effects Model (using Stata)

To understand the issue let's review what is the so call robust variance-covariance matrix estimates (VCE) and the implied "robust" standard errors. The robustness is meant to allow for violations of ...
user avatar
3 votes
Accepted

Linear Probability Model Instead of Logit in Fixed Effects Regression

FE logit requires the idiosyncratic errors to be IID across $i$ and $t$, quite a strong assumption. Also the regressors should be strictly exogenous, but it's the same for linear FE models. In your ...
user avatar
  • 1,889
3 votes
Accepted

What does "unit level" mean?

As far as I can see from the discussion there, by unit level they mean the level of the panel variable. What that is depends on your study. It might be firm or individual or country or whatever your ...
user avatar
  • 41.5k
3 votes
Accepted

What are the hypothesis and results explaination of joint null test?

There is no t-statistics because you are using F-test, with F-statistics. Also you do get p-value, p-value is the probability value of obtaining test results at least as large as the results actually ...
user avatar
  • 41.5k
3 votes

What are the confidence interval alpha in regression? Why 0.1 is looser than 0.01?

Confidence intervals (CI) exist within the `frequentist' tradition of statistics/econometrics. In the very loosest sense, frequentism takes the perspective that there is some true parameter out there. ...
user avatar
  • 565
3 votes
Accepted

What is the "prediction model" in Dasgupta (2019)?

I am not familiar with this specific text, however, I've been asked to elucidate and will do so as an answer, though I do not utilize these techniques often, so there are undoubtedly important ...
user avatar
2 votes

Why does adding a quadratic term to a regression change unrelated coefficients?

Your errors aren't the same anymore. For example, instead of writing $Y = \beta_1 + \beta_2 X + U$, you're actually writing $Y = \alpha_1 + \alpha_2 X + \alpha_3 X^2 + V$. There is no expectation ...
user avatar
  • 395
2 votes
Accepted

Two-way clustering in Stata

Have you seen http://faculty.econ.ucdavis.edu/faculty/dlmiller/statafiles/ ? I see some entries there such as Multi-way clustering with OLS and Code for “Robust inference with Multi-way Clustering”. ...
user avatar
  • 1,889
2 votes

Econometrics: Omitting a significant variable

It is important to recognize that there are path dependencies to removing different variables from your model. This is due to the fact that variables can be highly correlated (positively or negatively)...
user avatar
  • 426
2 votes

Econometrics: Omitting a significant variable

You should do none of the above. This is an invalid decision-making process. In the best of all possible worlds, create a series of do loops and go through the set of all possible combinations of ...
user avatar
  • 1,901
2 votes

Testing for heteroskedasticity in panel data vs time series?

You can regress residual squares (from RE or FE depending on your estimation) on $X_{it} \hat\beta$ and its square using the clustered standard errors (the ...
user avatar
  • 1,889
2 votes
Accepted

Coefficient omitted because of collinearity

You have firm fixed effects. Presumably, every firm is in the same country throughout your observation period. Moreover, no country ever changes its development status (I assume). Hence, for a given ...
user avatar
  • 1,262
2 votes

How to interpret fixed effect regression R-sq. results for panel data?

In panel regressions you have multiple dimensions and that is why also you have 3 different $R^2$. The within $R^2$ tells you how much variation within your panel variables is on average explained by ...
user avatar
  • 41.5k

Only top scored, non community-wiki answers of a minimum length are eligible