335 questions
Score of 0
0 answers
42 views
Decomposing a spatial covariate into WX and (X−WX) to address collinearity - does this work econometrically?
I'm working on a spatial regression with TWFE (migration modeling) where I want to include both an area-level exposure variable X (e.g., NDVI at the focal unit) and its spatially lagged counterpart WX ...
Score of 1
0 answers
137 views
Issue with fepois when trying to run a poisson event study in R
I'm trying to use fepois to run a poisson event study in R. The results of the model are always one coefficient for my event time.
> model_poisson <- fepois(
+ accident_count ~ i(...
Score of 0
0 answers
63 views
Instrument variable in interaction term in r
I want to estimate a fixed effects model with an interaction term in which one of the variables is endogenous.
In fixest:
feols(log(weekly_avg_price) ~ policy_dummy * holiday_dummy * gas_price | ...
Score of 0
1 answer
221 views
How do I read the results of a Hausman Test for a fixed effects and half-fixed effects model in R (using the plm package)? [closed]
I have 3 models for measuring how trading size (amount) affects bond prices.
I'm using the plm and fixest packages.
I have a random effects model:
random_model <- plm(Price ~ Amount + control, data ...
Score of 0
1 answer
57 views
Calculating price adjusted variables when base year is not in the beginning
I have a large dataset that has variables including country, year, GDP and inflation. I would like to recalculate GDP adjusting for prices for each year, given a base year.
Say I have the following ...
Score of 0
1 answer
72 views
Fixed Effects Regresion without Exogenous Variables in Python
I am trying to fit a TWFE linear regression, so I have an endogenous (y) variable, entity effects and time effects. I just want to fit this regression:
Y_it = \lambda_t + \gamma_i
But, if I do not use ...
Score of 0
1 answer
55 views
Calculating net assets with missing values: discrepancy in results
I'm working with a wealth component dataset that includes variables for housing, business, financial assets, loans, and non-housing loans. These variables have varying levels of randomly allocated ...
Score of 0
0 answers
78 views
VAR External Intrument in Python
I am trying to replicate the Gertler-Karadi 2015 External Instrument VAR model in python. I am having the issues with the functions. It is not taking values and throwing errors.
I was trying debugging ...
Score of 0
1 answer
164 views
How can I calculate the inflation rate in a new variable? [closed]
So I have this table, and I need to find the inflation rate per quarter using this data.
This is Econometrics, so I believe the formula that I have to use is this:
Inflation rate=(CPIprevious-...
Score of 0
1 answer
203 views
How do you use a custom distribution in a GARCH-model with rugarch in R?
I want to use a distribution that is not built in to the rugarch package in R. More specifically, the EGB2 distribution. If I have the PDF of the distribution, is it then possible to use this ...
Score of 0
0 answers
174 views
Instrumental variables with felm in R?
I am trying to run a fixed effects regression on the following panel dataset, using event as an instrumental variable for ms, using the felm function from the lfe package:
year<-c(1961 ,1962, 1961, ...
Score of 1
1 answer
94 views
Multiple scraping with R
Trying to scrape many pdfs using R.
I've found multiple examples on how to do this (here's one; here's another), but I can't find a way to do it.
I want to download files from the following main site
...
Score of 2
1 answer
159 views
Is it possible to find a point value from bounds?
My aim is to find the hourly wages of each observation. But the issue is monthly pay is given in bounds and monthly hours worked are given in levels. What can I do to divide the lower and upper bounds ...
Score of 0
0 answers
518 views
Scrape economic data from investing.com using Power Query
I want to scrape the data from the economic calendar using PQ on Excel.
I went on Data>From Web and I used this URL "https://it.investing.com/economic-calendar/exports-1762".
However, I'm ...
Score of -1
1 answer
95 views
Why does the python code calculate a very large variance for the lognormal distribution
enter image description hereThe final answer is Income y: Mean = 2484.87, Variance = 5650460.07, Gini = 0.4295
Consumption c: Mean = 2236.54, Variance = 2373130.74, Gini = 0.3159
I don't think this is ...