Hot answers tagged

7 votes
Accepted

Gini index vs Herfindahl index: one increases while the other decreases

They measure different things. In particular the Gini index measures inequality and is strongly affected by the number of individuals with almost nothing, while the Herfindahl index measures the ...
Henry's user avatar
  • 4,755
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
  • 55.5k
6 votes
Accepted

Is there empirical evidence on usability of Cobb-Douglas production function?

The simple answer to why the Cobb-Douglas functional form is used is because it is at least a log-linear approximation to some higher-order production function. That is, suppose you take a functional ...
jmbejara's user avatar
  • 9,345
6 votes

Journal that sum up a research area

In addition to the +1 list provided by tdm, journal of economic perspectives often publishes literature reviews and quasi-literature reviews. The goal is JEP is to fill the gap between different ...
1muflon1's user avatar
  • 55.5k
5 votes
Accepted

Why does pgmm function gives error every time?

The plm package is for panel data. Therefore there has to be variables in dataset with (id,time) to indicate the panel structure. If the argument index is not used when calling an estimation routine ...
Jesper Hybel's user avatar
  • 3,296
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 ...
1muflon1's user avatar
  • 55.5k
4 votes
Accepted

Vickrey Auction question

Optimal allocation refers to whom the seller awards the item, in order to maximize revenue. In a Vickrey auction, it is a Nash equilibrium for everyone to bid their valuations. This is stronger than a ...
ml0105's user avatar
  • 1,246
4 votes

Solving a system of equations using R

Note 1.: It is rude to edit a question after it was answered; I had to make significant edits to make my answer consistent. Note 2.: this is not a system of equations. There are two functions defined,...
Giskard's user avatar
  • 29.2k
4 votes
Accepted

Functional form for regression in a hedonic pricing model

It is widely considered that economic theory does not suggest any particular functional form for a hedonic pricing model. See for example Cassel & Mendelsohn 1985 which references several sources ...
Adam Bailey's user avatar
  • 8,346
4 votes
Accepted

Adding a subscripts for P (price) in equation

You should write: $$ P_{i,j,k} = f(L_i,S_j, E_k). $$
tdm's user avatar
  • 11.3k
3 votes
Accepted

Simultaneous Equations Models in R

If you search for “simultaneous equations” inside the Econometrics Task View web page you can find two results: the systemfit and the bimets packages. As you stated, the systemfit package is a ...
Andrew's user avatar
  • 46
3 votes

Replicate Blundell and Bond (2000) results using R

3. How do we recover parameters from production function estimates (INCOMPLETE ANSWER - will be updated with how to do this in R once I have time to figure it out, or if somebody else knows...) ...
antifrax's user avatar
  • 101
3 votes

How to estimate a model by pooled OLS when we DO NOT have panel data?

You don't need panel data for pooled OLS. You can use pooled cross section data which is similar to panel data but it is different data type. In panel data you follow the same units (e.g. individuals,...
1muflon1's user avatar
  • 55.5k
3 votes
Accepted

Total factor productivity (TFP) estimation in R

Following the prodtest manual they define omega as residuals from the model, that is $$\omega_{it} = y_{it} − (\alpha + w_{it} \beta + k_{it}\gamma)=y_{it}-\hat{y}_{it}$$ estprod does not have any ...
1muflon1's user avatar
  • 55.5k
3 votes

How to perform unbalanced panel data regression in R?

Here the solution would depend on what you want to accomplish. Note the problem is not just that the series is unbalanced, for an ordinary unbalanced panel data-set where firms have different number ...
1muflon1's user avatar
  • 55.5k
3 votes
Accepted

When does the "stationary" problem become and issue with panel data?

The data sample is so small that formal testing for stationarity would be essentially worthless. Inspect visually your individual series for any obvious trend. This would be the case where even with a ...
Alecos Papadopoulos's user avatar
3 votes
Accepted

Why there is only one value of confidence interval?

Standard error is not sd but se. Standard error is related to sd but they are not the same $\text{se}=\frac{sd}{\sqrt{n}}$. You can also confirm here that in the first case $1.41\approx 4.46/\sqrt{10}$...
1muflon1's user avatar
  • 55.5k
2 votes
Accepted

Code finding all stable matchings in one-to-one problem

The matchingMarkets package in the R software now implements two constraint encoding functions to find all stable matchings in the three most common matching problems: ...
kleindotuk's user avatar
2 votes

Code finding all stable matchings in one-to-one problem

Patrick Prosser has some great java code at http://www.dcs.gla.ac.uk/~pat/roommates/distribution/ which, among other things, can compute all the stable matchings in roommate problems. The code is for ...
Martin Van der Linden's user avatar
2 votes
Accepted

Cholesky Decomposition in R package "vars"

According to page 6 of the documentation for vars, the Cholesky decomposition matrix is lower triangular: The long-run impact matrix is the lower-triangular Choleski decomposition of the above ...
Kenneth Rios's user avatar
  • 1,259
2 votes
Accepted

Regression - Testing for autocorrelation in the presence of heteroscedasticity

General remarks: The BG test under homoskedasticity can be done using the bgtest command in the lmtest package of R. The $(n-p)...
chan1142's user avatar
  • 2,114
2 votes

How to perform unbalanced panel data regression in R?

It would be helpful to provide a reproductible example. In the paper Panel Data Econometrics in R: The plm Package, the authors explicitly mention that economic panel datasets often happen to be ...
emeryville's user avatar
  • 6,935
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

R's felm() fixed effects vs. factor() within lm()

You are correct in noting that, adding factor(FIPS) in side the regression formula should be equivalent to specifiying ...
anguyen1210's user avatar
2 votes

Solving a system of equations using R

This builds on @Giskard's answer above. Once you know the range of feasible market-clearing quantities, $q \in [ 0, \bar q ]$, you can directly apply R's uniroot ...
kyle's user avatar
  • 158
2 votes
Accepted

Interpreting an ADF test in R

Yes, the null hypothesis of ADF test is that the series contains unit root (e.g. see Verbeek, A guide to modern econometrics pp 273). So the results you present above indicate that you cannot reject ...
1muflon1's user avatar
  • 55.5k
2 votes

Journal that sum up a research area

Here are few: The Journal of Economic Literature The Journal of Economic Surveys The Annual Review of Economics
tdm's user avatar
  • 11.3k
2 votes
Accepted

Parallel pretrends in Callaway Sant'Anna "did" event study package

As it turns out, the issue was resolved when setting the reference period as "universal" instead of "varying", which is a problem when you have long-running linear pretrends as in ...
Oberberg's user avatar
2 votes
Accepted

Unit root tests in panel data

You already do not have enough data to run unit root tests (it is argued in various sources that minimum T for unit root test should be 25-30 e.g. see Baltagi (2005), Econometric Analysis of Panel ...
1muflon1's user avatar
  • 55.5k
1 vote
Accepted

pdynmc package in R | GMM issue

I apologize for my previous comment; it doesn't make much sense. Upon inspecting your data, I've found that there are IDs for which you only have observations for two years. The problematic IDs are: ...
Pedro Cunha's user avatar

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