# Tag Info

### 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. ...
• 3,422
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: ...
• 16.2k

### 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 ...
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 ...

### 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 ...
• 698

### 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/...
• 193

### 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 ...
• 50.2k
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}β}...
• 50.2k
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 ...
• 8,682

### 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

### 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, ...
• 1,587

### 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 ...

### 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$...
• 5,170

### 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. ...
• 9,295
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. ...

### 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 ...
• 32.9k
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 ...
• 28k

### 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 ...
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 ...
• 2,094

### 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. ...
• 573
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 ...
• 3,422

### 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 ...
• 395
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”. ...
• 2,094

### 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)...
• 426

### 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 ...
• 2,006

### 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 ...
• 2,094
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 ...
• 1,272

### 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 ...
• 50.2k