11

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: import pandas as pd import statsmodels.formula.api as smf x = [1, 3, 5, 6, 8, 3, 4, 5, 1, 3, 5, 6, 8, 3, 4, 5, 0, 1, 0, 1, 1, 4, 5, 7] y = [0, 1, 0, 1, 1, 4, 5, 7,0, ...


10

"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, but it's worth mentioning that this is not true in general. The following derivation will hopefully provide some understanding of the "contamination" you mention....


10

Because $\Bbb E[\varepsilon \mid x]= 0$ is one of the key assumptions for the estimation.


9

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. Whilst OLS is typically restricted to modelling continuous outcomes bound between $-\infty$ and $\infty$, in research one will often come across data where this is ...


9

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 $\mathbf M\mathbf X =0$ (for its own $X$ matrix of course). Is is called "residual maker" because $\mathbf M \mathbf y =\mathbf {\hat e}$, in the regression $\...


8

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 across the entire field of economics. Yes, microeconomic models (i.e., individual-level observations) will tend to give low R-squared values (often in single ...


8

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 flexible - less restrictive - than for example assuming that the time trend is for example linear $a \cdot t$, second order polynomial $at + bt^2$, exponential $exp(...


8

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 different from those in the rest of the world. Depending on what your goal is you might satisfy yourself with the observation that the effects are different for the two ...


8

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. Alternatively, it might be the case that the within group effects of the law are different from the between group effect. Joint and separate regressions Consider two ...


7

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 are Econometrics by Hayashi and Elements of Statistical Learning by Hastie et. al. Looking back at your question, these books may be too advanced. But maybe ...


7

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's not wise to ignore something interesting in your data, but I defer to the advisor who's familiar with the area. It may be a known phenomenon that isn't ...


6

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 psacalc) that can help bound the bias.


6

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 independent variables $$Q_d=\beta_0+\beta_1 P+\beta_2 S+\mu$$ where $Q_d$ is quantity demanded, $P$ is the price of the good in question and $S$ is the price of a ...


6

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 from the World Bank. They reports aggregate and individual governance indicators for over 200 countries and territories over the period 1996–, for six dimensions ...


6

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 $\rho$ is not observed. $\rho$ is endogenous so we can't just include it as a regressor in an equation. Thus, let us consider IV estimation. Obvious instruments for ...


5

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 more daughters changes your politics. The decision to have a second child is necessarily conditional on the previous decision to have the first child, and so ...


5

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 having just one endogenous regressor -you may have many. In such a case of course you need to find more instruments which make things harder -but in principle, ...


5

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 association. Anyway, the issue is analyzed in Maddala's Econometrics textbook. In the 2001 3d ed. the issue for simple regression is presented in ch. 3. ...


5

Use -areg- in Stata, and the standard errors will come out as in the textbook. Specifically, the command areg lpassen lfare ldist ldistsq y98 y99 y00, absorb(id) vce(robust) will produce the desired result. -xtreg- with fixed effects and the -vce(robust)- option will automatically give standard errors clustered at the id level, whereas -areg- with -vce(...


5

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 characteristics of good $y$ that are valued by the consumer. Assume for simplicity (as is usually done in the literature, and as is the OP case), that the consumer will ...


5

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 be answered in so little words, without data, while maintaining accuracy. That said I can try to answer your question as a reference point. Before even ...


5

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

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? Unsurprisingly the answer is no. The most you can get is the average of the $x_i$ series if you have the parameters of an unbiased regression between $x_i$ and $y_i$.


5

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 forecast the next two years' GDP for each country in the world. Then the population of interest is a set of pairs of the form "country, year". It isn't simply "all ...


5

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 the nature of the dependent variable, we are talking about an affine transformation here. Let a model be with a binary dependent variable and a single ...


5

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 made up as well) and adding up the heights of the 300 million citizens we get 500 million meters. Similar statistics for France are 4 million tons per year and ...


5

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 distribution. If I was to exchange $s_1$ for $s_2$, $f(s_2,s_1,\dots,s_n,v) = f(s_1,s_2\dots,s_n,v)$, the distribution does not change. And you can exchange as ...


5

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 increases other one decrease so you would expect they are correlated in negative way in this case.


5

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},$$ where $g\left(\cdot\right)$ can be nonlinear. There can be two cases for this problem $g\left(\cdot\right)$ is unknown. For example, if one use sieve estimation, ...


4

It won't help much with the high frequency variation of interest to you but this is a famous and important paper on this topic: I process satellite-generated data on terrain elevation and presence of water bodies to precisely estimate the amount of developable land in U.S. metropolitan areas. The data show that residential development is effectively ...


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