Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
28 views

Here is a dataset I want to run Pesaran's panel unit root test using the cipstest function in the plm library. It keeps giving me the error "x and y lengths differ", and I cannot sort this ...
Jose Luis Iparraguirre D'Elia's user avatar
2 votes
1 answer
62 views

I've recently encountered a problem with predict() function for plm regression that uses AR(1) term in form of lag(). Here is an toy example: 3 countries, 3 periods, current population as a function a ...
user19957's user avatar
0 votes
1 answer
177 views

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 ...
FPiper's user avatar
  • 83
0 votes
1 answer
64 views

I am trying to run a plm panel fixed effects model. The panel index runs at the county-year level. The challenge? I want to run fixed effects at the (higher order) state level. I can easily program ...
YouLocalRUser's user avatar
1 vote
1 answer
508 views

I am estimating an OLS regression without fixed effects and an OLS regression with fixed effects in R Studio. I have read, that it is common to use robust standard errors, when estimating a simple OLS ...
Lucas van der List's user avatar
1 vote
1 answer
662 views

I want to estimate a fixed effects model (with both country- and year fixed effects) and ADDITIONALLY apply HAC standard errors. Although I didn't get any error message after running the following ...
TFT's user avatar
  • 261
1 vote
1 answer
81 views

I am trying to run a two-way fixed-effects panel regression using plm in R. First, I randomly generate some data. Then I create time and firm indices (two-way indexing as usual in a panel dataset) and ...
Richard Hardy's user avatar
1 vote
2 answers
447 views

I am trying to replicate the Stata code (available here) in R. The idea is randomly selecting bootstrap sample from the idcode, not the idcode-year and then estimate the parameters from the selected ...
Nader Mehri's user avatar
1 vote
1 answer
149 views

What is the difference of pmg and pcce function in package plm? Details of both is almost same in the description. I wanted to perform mg, pmg and CCE mg test on panel data using plm function. I ...
Sunil Gaur's user avatar
1 vote
1 answer
102 views

I have time-series cross-sectional data with missing data. I have imputed the data with Amelia, but I encounter two error when I try to run my fixed effect regressions. First, if I do not specify the ...
flxflks's user avatar
  • 535
0 votes
1 answer
111 views

I wish to add the overall intercept of a fixed effects model ("within" panel data analysis). This is common practice in Stata and I wish to mimic the Stata output by including the overall ...
Emily's user avatar
  • 1
0 votes
2 answers
195 views

I would like to create a new variable sales.T.minus.1 which will present the value of sales from year - 1. I created a replicable example below: library(plm) library(dplyr) data <- pdata....
Viktor's user avatar
  • 15
0 votes
0 answers
157 views

I am trying to model the following interrupted time series model: y = b0 + b1*time + b2*event + b3*time_since_event The data, however, is nested inside users (id). Currently, I have the following ...
SanMelkote's user avatar
0 votes
1 answer
802 views

I'm working with panel data using the plm package in R to estimate a fixed effects model that includes interaction terms. I'm currently able to get my model results using plm and display them with ...
User's user avatar
  • 25
0 votes
0 answers
41 views

I am trying to run a time-fixed effects regression with plm using the wbstats library. I have attached an image of the dataset for reference. I am rather new to this. Model: AfricaTotal <- plm(...
CWK's user avatar
  • 33
0 votes
0 answers
67 views

New R user here. I have a bunch of regression models that can get quite big, and I'm trying to find some way to export the results into a latex table using stargarzer. structure(list(country = ...
CF96's user avatar
  • 87
0 votes
1 answer
212 views

I want to do panel regression R and use multiple fixed effects. I am trying to construct panel dataset first by using pdata.frame function, but I am not sure whether I am doing it right. I have trade ...
helloall1892's user avatar
0 votes
1 answer
237 views

I am doing a lot of GMM regressions and need to report all tests. I'm using plm and stargazer package for this. However, stargazer does not provide this tests directly, so I wrote a long code to add ...
Luiza Rodrigues's user avatar
0 votes
1 answer
55 views

I am trying to run a Geographically weighted panel regression model as seen below. However I keep on getting an error of duplicate ids. bw.GWPR(formula = formula1, data = finalprepostdataset3, ...
josephn's user avatar
  • 49
0 votes
0 answers
88 views

I don't understand what's happening in RStudio. After running the plm function for fixed effects estimators, I get a warning that appears for whatever I type in R. The warning is In if (n >= ...
Maximilian's user avatar
1 vote
1 answer
702 views

I encounter a problem with the reporting of heteroscedasticity-robust standard errors for a panel data regression (plm) in the output with modelsummary. For a simple linear regression the reporting ...
ArN's user avatar
  • 53
0 votes
1 answer
32 views

I have a fix effects model like this: Indeksy <- updata.frame(PiS, index = c("Rok","Powiat"))) fixed_effects_model_05_07 <- plm(Logarytm_Wynik_Wyborczy_05_07 ~ ...
Viktor's user avatar
  • 15
0 votes
1 answer
194 views

I am attempting to run the following IV regression on an unbalanced panel dataset. The variables TOTAL_E, TOURISM_5k_SUM and TOURISM_10K_SUM are endogenous, while HHSIZE2 and SEX are exogenous ...
Matt's user avatar
  • 69
1 vote
0 answers
79 views

I am trying to estimate a spatial panel model with spml. The data (bp_sf_subset) nests years (2013-2019) within 690 block groups and has no missing values. I used the following code to obtain the ...
skol's user avatar
  • 31
0 votes
3 answers
707 views

I have a panel data: Panel Data set - gravity model international trade My R code: #importing dataset df <- read_excel("DataSet_Final.xlsx", col_types = c(&...
0klahoma's user avatar
0 votes
0 answers
96 views

I have a question about an analysis I want to perform with panel data with three levels. Am i correct if because it's panel data, plm() (from package plm) would be more appropriate, however it does ...
Sophie's user avatar
  • 1
0 votes
1 answer
242 views

I was doing panel data regression on this data set Panel <- foreign::read.dta("http://dss.princeton.edu/training/Panel101.dta") I tried this code library(plm) grun.tvarw <- pvcm(y ~ ...
souvik mukherjee's user avatar
1 vote
0 answers
456 views

Currently I am estimating IV regresssion with panel data. I thought, fixest packages is the good fit for the analysis. After it is showing some warning when I installed, I can't recall the library. ...
Ankhbayar.S's user avatar
2 votes
0 answers
136 views

I need to estimate a difference-in-difference regression to understand the effect of a policy on various municipalities. I have a dataset that spans from 2001 to 2019, covering almost 7,900 ...
M_B's user avatar
  • 21
0 votes
0 answers
36 views

I am using the lag function (package plm) which is returning me the contemporaneous value, not the lagged one. In this code regarding a panel of data (years, agencies), the chg variables is filed with ...
Pedro Camões's user avatar
0 votes
0 answers
299 views

I want to run a Fama-MacBeth regression in R. My dataset has a few independent variables and date and ticker variables. I have run a code as follows: prepared two codes but their output is different. ...
ozgursafak's user avatar
0 votes
1 answer
564 views

I am trying to do the Pesaran CD Test on some panel data on Italian Provinces. For each unit I have 22 years, each one splitted in quarters (so 92 observation for each unit). The variable "...
Marco's user avatar
  • 1
0 votes
0 answers
482 views

I estimated a two-way (meaning individual and time FE) fixed effects model with the plm package. The code I used for my regression is : my_plm_model <- plm(Y ~ X, data = my_data, model = "...
Muller I. 's user avatar
0 votes
2 answers
912 views

I have time panel data of 34 countries that describes on which days they have committed to giving military aid in €. I am running a fixed effects regression to study how the sum of this aid changes ...
Elmo_'s user avatar
  • 3
4 votes
1 answer
79 views

If I perform simple and seemingly identical operations using, in one case, base R, and in the other case, dplyr, on two pdata.frames and then model them with lm(), I get the exact same results, as ...
snowpeak's user avatar
0 votes
1 answer
220 views

All the ressources I find on the internet show me how to conduct a Durbin-Wu Hausman test and an overidentifying restrictions test on cross-sectional data. How could I do these tests in R with fixed ...
Muller I. 's user avatar
0 votes
1 answer
364 views

I want to run a panel regression in R with the help of plm. Its basic function has a parameter weights, but I cannot understand in what way and format I have to put it there. Can any one help Consider ...
Aleksey Kipriyanov's user avatar
2 votes
1 answer
913 views

Is there a way to make predictions from a fixest model on an observation that has an out-of-sample fixed effects level? I would like this prediction to be based on the weighted mean of the existing ...
dufei's user avatar
  • 3,489
0 votes
0 answers
79 views

I'm working through question C3i in Wooldridge's Intro to Econometrics text and running the following code: library(wooldridge) library(plm) jtrain.p <- pdata.frame(jtrain,index=c("fcode",...
AKJ's user avatar
  • 95
0 votes
1 answer
352 views

here is a weird one: I am working on the following data frame: str(ccomb) 'data.frame': 358 obs. of 36 variables: $ Country.Name : chr "Albania&...
Leetram's user avatar
  • 15
0 votes
1 answer
123 views

I'm trying to run a robust F-Test using a PLM object in R. I'm running the following code: library('wooldridge') data(wagepan,package='wooldridge') library('plm') pdata<-pdata.frame(wagepan,index=c(...
AKJ's user avatar
  • 95
0 votes
0 answers
479 views

Unit-fixed effects regression is supposed to drop time-invariant variables because time-invariant variables are absorbed by unit-fixed effects. This happens when we use plm function, but not with lm ...
Leonardo19's user avatar
0 votes
0 answers
171 views

I'm trying to do a Fixed Effect analysis with AR(1) Disturbances. From research, I found that there was a package called panelAR that incorporated the fixed effect analysis with autoregression ...
Jisoo Hyun's user avatar
1 vote
1 answer
229 views

I am working on a Panel Data that spans from 3rd February 2020 to 29th May 2020. In order to test my hypotheses, I need to run the same regression on the whole period and additionally on 3 different ...
genistae's user avatar
0 votes
1 answer
224 views

I have been throught the Im, Pesaran and Shin paper many times to solve this issue but have failed so far. When I perform the IPS test in R using the plm package [purtest() function] I get exactly the ...
Econom0nster's user avatar
0 votes
1 answer
373 views

I am working on a regression where my dependent variable is abnormal earnings growth divided by the book value of equity (AEG_BV) and my independent variable is the lagged version of AEG_BV. I want to ...
oreka97's user avatar
  • 25
1 vote
0 answers
126 views

I am using the plm package for the GMM. How can I see what is the number of instruments used? Here is my code: z1.ABquad <- pgmm(cpi ~ lag(cpi, 1:1)+lag(gdppc, 4:4) + lag(expense, 7:7) + lag(...
Rossana Arcano's user avatar
2 votes
1 answer
2k views

I run three different estimations of panel linear models (fixed effects model with two fixed effect (id and year)). fixed_YIELD_mean_to_treat.100 <- plm(YIELD_mean_total ~ treated.100 + ...
Sulz's user avatar
  • 513
0 votes
0 answers
244 views

When I launch the pgmm function using the plm package for my dynamic panel data model I can see the output that shows the results for every variable I inserted in the model (including the lags) but I ...
Rossana Arcano's user avatar
1 vote
1 answer
4k views

I want to do an IV regression in Fixed-Effect Models with diagnostics (Wu-Hausman, weak instrument, etc.). I tried three options, each with its problem-- y is dependent variable x1 is the endogenous ...
user7453767's user avatar

1
2 3 4 5
11