Hot answers tagged

15

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. You will find that using one language translates very well to another. With resources like stackoverflow, I would not be too concerned about which. I would ...


10

LaTeX with forest The forest package of LaTeX allows you to draw game trees with pretty simple syntax. After copying a pre-set template into the LaTeX preamble, one can build up the game tree using a nested [] syntax, then the program takes care of node placement/spacing/etc. pros: customizability (you can annotate the game tree in any way you want) and ...


8

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 3 grad students using R instead of Stata (oh and I guess with myself it makes 4 ;)). If you are looking for more heavily R-oriented econ department, you might ...


7

Mathematica has a graph building and drawing capability. So, if you built the graph in Mathematica, then you could plot it using settings of your choosing. In Mathematica, you might use the TreeGraph as way to build the graph, and TreePlot as a way to plot it. For example, the following code generates a tree with the nodes labeled by coordinate and has a ...


7

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 faculty using R, either have a look at the papers/books published by one department. Or look at the R-packages published in your field and find the authors. I ...


7

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 figure out which software was used. One example are recent publications in the American Economic Review. For instance, Calsamiglia, Caterina, Guillaume Haeringer, ...


6

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 form that looks like this: $\log Y_t = f(A, K, L)$. Then a linear approximation would look like the Cobb-Douglas production function. (For a small $1\%$ ...


5

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 diversity of the shares (for example the choice in a market) and is almost unaffected by those with almost no share If $n$ people had equal shares then the Gini ...


5

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 most econometric analysis I usually default to R. I find also producing nice standard statistics graphics with R easier (but for maps I prefer Python). However, ...


5

You could try searching the Harvard Dataverse for fileType:"R Data" like this: https://dataverse.harvard.edu/dataverse/harvard?q=fileType%3A%22R+Data%22 I think your use case of wanting to search for data in specific formats such as RData is a common one so I just created an issue about improving Dataverse to support this use case better: https://github.com/...


5

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, Gauss Java, C#, C, Julia are used when performance is important (heavy simulations, combinatorics, etc.). In a specific paper, software is easy to identify ...


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.


4

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 Bayesian Nash equilibrium, which is the solution concept in Bayesian games (which include auctions). The Bayesian Nash equilibrium is the solution concept in ...


4

If you use LaTeX, you can also draw game trees with the istgame package, which is based on TikZ. The manual contains lots of examples with full codes including: game trees in any direction: downwards, upwards, eastwards, -45 degree, etc. labelling players, action labels, and payoffs decision nodes, chance nodes, terminal nodes various information sets ...


4

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, but only one equation: $$P_D(q) - P_S(q) = 0$$ What helps here is that inverse demand is decreasing in quantity while inverse supply is increasing. So given ...


4

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 such as pgmm() then it is automatically assumed that the first two columns indicates panel structure hence are (id,time). The error occuring here is duplicates ...


3

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 powerful tool for econometric estimation of simultaneous systems of linear and nonlinear equations, but it only provides fitting procedures, thus it cannot be used in ...


3

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 comprehensible documentation but one way how we can get the above would be to extract the coefficients from the model and then calculate $y-\hat{y}$ manually. We ...


3

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 of $T$ observation the command would still work. Here no adjustments are necessary, you can easily try it yourself: install.packages("plm") library("plm") data(...


3

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, firms, countries, stocks, etc.) consistently over time, whereas in pooled cross-section data you will have 'a time series of cross-sections' where the same ...


2

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: hri: college admissions problem (including the student and college-optimal matchings) and stable marriage problem (including men and women-optimal matching) sri: stable roommates problem. ...


2

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 roommates problems, but Patrick's code allows preferences over roommates to include unacceptable roommates. To implement a two-sided market, just make sure any ...


2

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 unbalanced, which case needs some adaptation to the methods. Hopefully, they provide a solution and the result of their work is bundled in the plm add-on package. ...


2

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 matrix and the contemporaneous impact matrix is equal to: $$(I_K − A_1 − \dots − A_p)Q$$ where $Q$ assigns the lower-triangular Cholesky decomposition. ...


2

General remarks: The BG test under homoskedasticity can be done using the bgtest command in the lmtest package of R. The $(n-p)R_{aux}^2$ version mentioned in link works only under homoskedasticity. In the presence of heteroskedasticity, Wooldridge (1991, JoE) gives a discussion (as noted in the Wooldridge textbook you mentioned). What I think: I guess that ...


2

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 short sample non-stationarity would be a problem.


2

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...) Blundell and Bond aren't estimating the parameters of a Cobb-Douglas production function. They're estimates the parameters of a "dynamic (common factor) ...


2

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 function (R manual), which searches a given interval for the zeros of a function. # What are my demand and supply functions? 1 - q and q, because economics. P_D <- function ( q ) { 1 - q } P_S &...


2

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 the null of an unit root and consequently you should treat your series as non-stationary. How can I use the Dickey-Fuller test statistic in this case to ...


1

You can use the dplyr::distinct function to keep only unique values, at a particular level of aggregation. So, for example, to only keep unique combinations of country and year in df, you can use library(dplyr) new_df <- distinct(df, country, year) df should be in long format, though.


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