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: ...
BKay's user avatar
  • 16.3k
8 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}β}...
1muflon1's user avatar
  • 56.4k
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 ...
1muflon1's user avatar
  • 56.4k
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/...
Max Ghenis's user avatar
6 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 ...
tdm's user avatar
  • 12k
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
Pietro Battiston's 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 ...
eivindhammers's 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$...
Bayesian's user avatar
  • 5,290
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_newbie10's 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 ...
Alecos Papadopoulos's 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 ...
Giskard's user avatar
  • 29.5k
4 votes

Regression on individual vs collapsed data

In general, regressing at the individual level does not guarantee the same results as at the group level. The results may be the same, depending on how the data was collapsed, but not always. However, ...
BB King's user avatar
  • 6,148
4 votes

Regression on individual vs collapsed data

Should we expect the regression on individual and aggregated data to be the same? Not necessarily. One reason is that data may be aggregated in more than one way, and different aggregations may yield ...
Adam Bailey's user avatar
  • 8,369
4 votes
Accepted

Regression on individual vs collapsed data

EDIT: Clearly, the controls were the problem. Without controls, this works fine, but with controls not. We are starting to learn that including controls linearly is not as innocuous as one might think....
Papayapap's user avatar
  • 1,843
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 ...
José Bayoán Santiago Calderón's 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 ...
chan1142's user avatar
  • 2,114
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. ...
EB3112's user avatar
  • 577
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 ...
RegressForward's user avatar
3 votes

Ask about the HLT method of "Life cycle wage growth across countries"

Let's take an example. Assume there are 5 periods, then the dummies take the following values: $$ \begin{align*} &d_1 = \begin{bmatrix} 1 &0 &0 &0 &0 \end{bmatrix}\\ &d_2 = \...
tdm's user avatar
  • 12k
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)...
Andrew M's 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 ...
Dave Harris's user avatar
  • 2,006
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 ...
E. Sommer's user avatar
  • 1,307
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 ...
1muflon1's user avatar
  • 56.4k
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 ...
chan1142's user avatar
  • 2,114
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”. ...
chan1142's user avatar
  • 2,114
2 votes

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

I use Stata and Python heavily. I have dabbled in R, but won't pretend I know it well enough to comment on it. Stata and Python complement each other nicely and I am a big fan of both. You can run ...
Bilingual's user avatar
2 votes
Accepted

Should I include country dummies when I combine datasets of 3 countries?

I would advise you to think deeper about your research question first, as this will guide the decision to use country fixed effects. If you would like to exploit cross country variation, for example ...
mosquitonomics's user avatar
2 votes
Accepted

How to add additional observations to panel data?

Not sure if this is on-topic, but I'll give a simple solution. It's perhaps not the most efficient, but should be easy enough to follow. Assuming you also want to keep "category" and not ...
BB King's user avatar
  • 6,148
2 votes
Accepted

Substitute a continuos variable with a categorical one in Linear regression

You can use the continuous variable "Assets" as stand-alone, and use its categorical incarnation for the interaction term. While we may be accustomed to use "automatically generated&...
Alecos Papadopoulos's user avatar

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