Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [r]

The application of the statistical programming language "r" to economic problems.

5
votes
1answer
26 views

Stable marriage problem with transferable utilities

I'm looking for a package or a code (preferably in R) that finds the solution to the stable marriage problem with transferable utilities (Shapley and Shubik 1971). Specifically, I'm looking for one or ...
2
votes
1answer
23 views

How to perform unbalanced panel data regression in R?

I am attempting to perform an unbalanced panel data regression in R. My code is as follows: ...
2
votes
0answers
24 views

How to control for population in Difference-in-Difference?

Random example, but let's say I'm examining the effect of a health program on influenza cases in India. They just randomly start the program in 7 of the 29 states. I have data on the number of flu ...
2
votes
0answers
38 views

Helping in understaing new Pesaran and Timmermann test (and R code validation)

I am currently working with Pesaran & Timmermann test version from year 2009. Since I could not find any R package that contains function to calculate it (...
3
votes
1answer
59 views

Cholesky Decomposition in R package “vars”

I'd like to know if, when running a VAR model in R (package "vars"), the cholesky decomposition matrix is upper triangular (so I should order my variables from more endogenous to less endogenous), or ...
1
vote
1answer
72 views

Calculate optimal discount for product bundling

So recently I made some rules with my transaction data. Based on it I can determine which products are profitable to bundle it together. But even though I know e.g. product A→ product B, are there ...
3
votes
1answer
86 views

Regression - Testing for autocorrelation in the presence of heteroscedasticity

I have constructed a linear time series regression model and estimated the parameters by applying OLS. I now want to test wether the assumptions for proper large sample inference (asymptotic Gauß ...
1
vote
1answer
44 views

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

I recently came by a post that states in panel data with small time dimensions the stationarity issue is not present, is this true? can anybody provide a source for this? I'm working with a panel ...
4
votes
1answer
55 views

When first differences contradict a regular regression regarding Investment vs Output relationship

Im doing some research with some panel data I have on firm output and investment. I ran two equations. $$y=\beta_0+\beta_1x+\beta_2x^2+\mu$$ $$\Delta y=\alpha_0+\Delta\alpha_1x+\epsilon$$ in R ...
2
votes
1answer
794 views

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

I am comparing two vectors of values which indicate portfolio weights in monetary units at two different dates. I wanted to quantify if the concentration in the portfolios changed. So I moved on with ...
0
votes
2answers
412 views

Price optimization with demand forecast

I have one year sales data of a retail company and lets say I am forecasting the next month sales for the product. I have got the sales using time series in R. Now I want to forecast the price as well....
12
votes
2answers
3k views

Visualization tools for game theory: Game trees

There are many ways to draw a sequential game 'by hand'. By drawing the game I mean this: Displaying players' decision points, available actions and payoffs. Is there any way I can do this in R or a ...
-1
votes
1answer
45 views

Statistics: Understanding confidence interval [closed]

In R I have used lm()to fit a model. Then I use the confint() function to learn more about the slope. How to I understand the ...
2
votes
1answer
121 views

Vickrey Auction question

I'm looking at this webpage here: https://gilkalai.wordpress.com/2013/05/18/test-your-intuition-21-auctions/ I've generated the R code below to simulate the value for each Bidder 1000's times. I'm ...
1
vote
0answers
312 views

SVAR Historical decomposition

Does anyone know how to do VAR historical decomposition of a series in R?
5
votes
2answers
1k views

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

Do you know of any publicly available code in python or R (or any other free high level language) that returns all the stable matchings for any one-to-one matching problem? Note: This is related but ...
10
votes
1answer
574 views

Examples of Applied Micro Paper with R (!) Code and Data in Public Repository

Can anyone suggest examples of relatively simple applied micro papers (e.g. an RCT or straightforward regression model) of possible interest to a general audience, that have their data and code, ...
3
votes
0answers
197 views

Forecast of ARMA-GARCH model in R

I managed to forecast a GARCH model yesterday and run a Monte Carlo simulation on R. Nevertheless, I can't do the same with an ARMA-GARCH. I tested 4 different method but without achieving an ARMA-...
4
votes
0answers
49 views

Post-redistribution Lorenz curve comparison with reranking in R

Using R, assume the population income for N= {1.. 7} looks like $X_1$= c(1,3,5,7,7,19,21). Use the Lc() function from the "ineq" package to plot the corresponding Lorenz curve $L_{X_1}(p_1)$. Next, ...
6
votes
2answers
566 views

Papers that use R vs Stata

Is there any way to tell if a paper used R instead of Stata or Matlab for the estimation? I know it doesn't matter for the quality of the paper, but I'd just be interested to see how many papers use ...
12
votes
4answers
708 views

R in econ departments?

According to my personal observation the majority of (prominent) economists prefer use Stata for their statistical analysis and Matlab for other mathematical work. SAS and Excel are also used (...