Questions tagged [plm]

The `plm` package for R provides functions for linear models for panel data.

Filter by
Sorted by
Tagged with
0 votes
1 answer
24 views

Rescaling in within transformation - Fixed effects model

I have been studying fixed effects models recently and I am stuck at within transformation. According to my understanding the dependent and independent variables are demeaned wrt clusters and ...
7 votes
3 answers
76 views

Can robust standard errors be less than those from normal OLS?

I'm reading about Robust Standard Error Estimators for Panel Models from the developer of plm R package (Millo, 2017: 21). But my question is not about software. In ...
  • 297
0 votes
1 answer
73 views

Forecasting with panel data/ time series

I have three questions for you regarding the prediction of panel data. There is a function predict.plm() in the plm package for <...
1 vote
1 answer
62 views

Identical OLS and Random Effect Model; Why is my theta/individual effect variance zero?

I have a panel data set with companies and some variables expressed as changes year-to-year from 2017-2018 (2018) to 2020-2021 (2021). I am trying to estimate a regression estimating the effect of all ...
0 votes
0 answers
32 views

Autocorrelation of the independent variable (Panel setting) with R

I have panel data with only a few individuals and time points and, after testing accordingly, I would like to create an RE model in R. For this I have some questions: I found out that I have ...
0 votes
0 answers
64 views

R: Heteroskedasticity and Autocorrelation Consistent Covariance Matrix Estimator for panel linear model with fixed effects

Is there a way for generating Heteroskedasticity- and autocorrelation-consistent (HAC) standard errors for panel linear model with two fixed effects? I came across ...
  • 11
0 votes
1 answer
70 views

How to perform a random-effects model to include more than one category?

Sample Panel Data Year Firm_ID Region Industry ROE ROA Tobin_Q ESG Leverage Age Size 2012 1 Asia/Pacific Rim Oil_and_Gas_Refining_and_Marketing 12.19 6.22 1.17 51.24 1.45 1.58 6.51 2013 1 Asia/...
's user avatar
1 vote
0 answers
81 views

Robust standard errors for poisson/negbin panel data estimators

I am trying to calculate robust and clustered standard errors for Poisson and Negative Binomial panel data estimators. I am using 'pglm' package. Ideally, I would be able to use the ...
0 votes
1 answer
70 views

Is the within estimator from plm() estimated by Ordinary Least Squares (OLS)?

I have a panel data set with `N = 17 Spanish regions and T = 32 years. I performed some models like this one with the plm() function and the within estimator for individual fixed effects: ...
's user avatar
0 votes
0 answers
101 views

Choosing models for unbalanced panel data in R

I wanted to get suggestions/resources on choosing the right model for my data. I have an unbalanced panel data (df) with a bivariate outcome (0 or 1). The predictive variables are mix of time-varying (...
's user avatar
4 votes
1 answer
996 views

Is it ok to run a plm fixed effect model and add a factor dummy variable in R?

Is it ok to run a "plm" fixed effect model and add a factor dummy variable in R as below? The three factors "Time", "Firm” and "Country" are all separate indices ...
  • 394
0 votes
0 answers
411 views

Dummy variables in a fixed effects model

I'm currently working on the correlation between sustainability and performance in the S&P500. I'm using a panel data model, with fixed effects for both, ime and firm. I wanted to insert a sector ...
0 votes
0 answers
73 views

fixed effect model (plm) - looking at age effects

I'm examining the link between age and an outcome in an unbalanced panel data (each individual responded to the survey 1 to 8 times) I'm estimating the following fixed effects model: ...
  • 331
1 vote
1 answer
131 views

Why do fixed effect and dummy variable models differ?

Year as a dummy ( 1995 is the omitted year): ...
0 votes
0 answers
14 views

Why are my dummy variable results different than my Within estimator results? [duplicate]

Year as a dummy ( 1995 is the omitted year): ...
0 votes
1 answer
125 views

What tests effectively compare a random effects model and a fixed effects model in R?

I am looking for a way to compare two models (I am not very good at R or statistics). The only difference between the two is that one has fixed effects and the other has random effects. Let me know ...
0 votes
0 answers
44 views

Likelihood Ratio Test on Ordered Probit Models (Panel Data) in R

I am in desperate need of help. I need to perform a likelihood ratio test on my panel data ordered response models to decide whether it's better to use the standard or the Random Effects Ordered ...
  • 1
0 votes
0 answers
61 views

fixed effects regression - low R^2 for twoways model compared to individual effects

I have the following model: ...
0 votes
0 answers
90 views

Panel dataset with not consistent categorical variables across time - mapping

I am looking for any resources (journals papers, books, ...) which are connected with handling not consistent categorical variables across time in a panel dataset. Might you already hear about this ...
  • 93
0 votes
0 answers
73 views

Data structure issue with plm: multiple observations with the same year-country pair

I am trying to run fixed effects and random effects regressions on data which is not pure panel data but rather independent cross-sections over several years. In addition, the yearly cross-sections ...
  • 1
0 votes
1 answer
187 views

Understanding fixef() output of fixed effects coefficients

I have a panel data set with several ID's and each has a certain number of year observations. When I fit a fixed effects ...
0 votes
0 answers
260 views

Panel Data Regression, ADF Stationarity Test in R

I am conducting a fixed effects regression with balanced quarterly paneldata. plm(MOD.WITHIN, data=pdata, model = "within", effect= "individual")...
2 votes
1 answer
1k views

Finding intercept term in fixed effects model [closed]

I am using the plm() function in R with a fixed effects model: ...
0 votes
1 answer
398 views

Fixed effects model with dummy variables [closed]

I have to set up a regression analysis of panel data with a dummy variable (1 or 0) and fixed effects (for example time). Could someone help me how to do this in R? For now, I have set the dataset as ...
  • 3
0 votes
1 answer
116 views

Panel regression without predictors in R

I want to run a plm regression model without predictors (i.e. a regression model on the intercept). When I run a fixed effects model (...
1 vote
0 answers
68 views

Can't seem to replicate the Hausman test statistic without the phtest() function in R

I am trying to replicate the results of a Hausman test (random vs. fixed effects) in R without the function phtest. This works just fine with the help of the ...
1 vote
0 answers
325 views

In R, Fixed effects regression model drops time invariant variables, is random effects model equally good instead?

I have unbalanced panel data and want to fit a regression model with the degree of internationalization of a firm as dependent variable, measured in the ratio to foreign sales to total sales (fsts). ...
  • 11
1 vote
0 answers
72 views

Retrieve random effects from an instrumented RE model

I am writing my term paper and I feel a demand to retrieve the individual effects from a Random Effects Instrumented Model (due to the usage of lags of regressors as the instruments, the panel is ...
  • 11
2 votes
2 answers
188 views

Baltagi Table 8.1 Replication with plm

I saw this previous post from 2017 that talks about the same table but only focuses on OLS. I'm also working on replicating Table 8.1 in Baltagi's Economic Analysis of Panel data book. I can ...
  • 21
0 votes
1 answer
725 views

R: difference in interpreting estimates of plm and LSDV model?

What is the difference in the estimates of plm and least squares dummy variable (LSDV) models? And how does the interpretation of the variables differ in general? Imagine the following ...
  • 3
0 votes
0 answers
61 views

R: Panel unit root test with unbalanced data due to late entry into the sample

I would like to conduct a panel unit root test on the price constituents of the Dow Jones Industrial Index, which is composed of 30 stocks. The index spans 20 years, and stocks drop out of the index ...
  • 293
1 vote
0 answers
224 views

Interpreting results of panel granger test

I ran the Panel Granger Causality test from the plm package and I'm unsure how to interpret the results. I don't know what "Ztilde" represents, and I'm not sure if the p-value represents the ...
-1 votes
1 answer
328 views

Aliased coefficients in panelgranger with just one variable

I'm running the pgrangertest package from plm, and getting the following error: ...
1 vote
1 answer
3k views

R question: plm "empty model" error - how to correct panel data?

After days of searching for an answer to my problem, reading guide documents, questions and answers here and elsewhere, I decided to ask this community. I am new to R (and R Studio), coming from ...
0 votes
1 answer
384 views

plm function in R: Order of input for index changes results when model = within?

I am only slightly familiar with the plm() function in R, and I get this odd phenomenon. When my input is this: ...
0 votes
0 answers
19 views

How to choose the within factor in Fixed effect model

I am doing a fixed effect model to research on support’s effect on reducing number of injured employees. I have a dataset on company level from 2012-2020: year average age total salary total number ...
  • 21
2 votes
0 answers
142 views

What are the standard panel data model selections and steps?

I have got a panel data in R ...
  • 21
2 votes
1 answer
2k views

How to interpret pFtest?

Let's consider documentation of pFtest : https://www.rdocumentation.org/packages/plm/versions/2.2-5/topics/pFtest. I don't know where can I find desciption of this test - where can I find $H_0$, $H_1$....
  • 432
0 votes
0 answers
303 views

Panel Data in R - Can I implement a plm regression with categorical data?

I am working (In R) on a panel modelling of an econometric problem. I have : one dependent variable : Y with values in real positive numbers two explanatory variables : VAR_1 (real positive), VAR_2 (...
3 votes
0 answers
1k views

R plm cluster robust standard errors with multiple imputations

I am looking for a way to implement (country) clustered standard errors on a panel regression with individual fixed effects. That is, in plm() I want to define some ...
2 votes
3 answers
624 views

When to use instrumental variables in a panel regression R

I'm doing panel regression analysis using plm package. I would like to know if there is a way to understand when it's necessary to use instrumental variables. Are ...
2 votes
0 answers
226 views

Dealing with plm for panel regression models

I'm dealing with panel data to study how macroeconomics indicators influence life insurance market with R-studio, but I'm not very familiar with panel regression, in particular with diagnostic tests ...
5 votes
1 answer
1k views

Random Effects Results in R (plm) Cannot Replicate Results in Stata

I have been working on migrating a current project from Stata to R, where I have encountered difficulties with differing results of random effects regressions. I have panel data from an experiment ...
  • 53
1 vote
0 answers
109 views

Robustness checks for fixed effects model

So I'm estimating a fixed effects model using plm that looks at the effects of immigrants on house prices in different districts over several years. And I was ...
1 vote
1 answer
220 views

Is it possible to extract fixed effects from the general FGLS fixed effects model? [closed]

When I use pggls commmand for general FGLS estimators for panel data from R package plm model, ...
  • 13
0 votes
0 answers
223 views

Interpretation of Individual Effects with Inlcusion of Year Dummies in Fixed Effects Regression for Unbalanced Panels

I work on my research in finance and I am running an unbalanced panel fixed effects regression. My dataset consists of 101 units (bonds) for which I have daily observations of their ask yield since ...
7 votes
1 answer
2k views

Three way fixed effects vs combining two of the effects

I have panel data on employment that varies by year, sector and location and thus would like to run a fixed effects regression considering these 3 dimensions. The issue is that I use R and the ...
0 votes
1 answer
604 views

3 plm-package (R) questions [closed]

I am currently trying to perform my panel data analysis with R using the package 'plm'. This has resulted in 3 questions for me: (1) Since the panel analysis with 'plm' is still a linear regression, ...
0 votes
1 answer
31 views

How to obtain a distribution of the unobserved time-invariant fixed effects in a fixed-effects regression?

I am running a fixed-effects unbalanced panel regression using the plm package: ...
4 votes
2 answers
4k views

plm in fixed effects model doesn't work with id and time

I am writing currently my thesis and I am stuck with a problem. I am trying to figure out how firm level, country level and industry level variables influence corporate social responsibility. I want ...