Questions tagged [plm]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
21 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). ...
1
vote
0answers
31 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 ...
0
votes
0answers
50 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 ...
0
votes
1answer
68 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 ...
0
votes
0answers
34 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 ...
1
vote
0answers
49 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 ...
0
votes
1answer
51 views

Aliased coefficients in panelgranger with just one variable

I'm running the pgrangertest package from plm, and getting the following error: ...
1
vote
1answer
314 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
1answer
31 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
0answers
17 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 ...
0
votes
0answers
35 views

What variables to include in fixed effect model (Panel data)

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 ...
2
votes
0answers
53 views

What are the standard panel data model selections and steps?

I have got a panel data in R ...
0
votes
0answers
47 views

plm/splm in R - fixed effects panel models with time invariant variables

I amestimating the following model for crime rate: tot_crime <- log_rt_crime ~ ndvi + log_disad_inde + log_density where ndvi ...
0
votes
0answers
19 views

Which $R^2$ plm outputs?

We have three kinds of $R^2$ when considering panel regression (overall, within and between). Programs like stata return all 3 r-squared whereas plm in R returns only one. My question is : For sure ...
1
vote
1answer
536 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$....
0
votes
0answers
70 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 (...
0
votes
0answers
198 views

System GMM with R: issues with multi-part formula for IVs and the sargan test results

I'm working on a panel dataset with N = 30 countries and T = 15 years. I'm using R and the plm package for my analysis. Based on ...
2
votes
0answers
699 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
3answers
204 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 ...
1
vote
0answers
106 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 ...
0
votes
0answers
62 views

Spatial Panel Data Analysis in R: Comparison between 'spml' and 'plm' function

So, I'm a R user and currently working on a spatial analysis on panel data. Based on my experience for these past days, I understand that spml function on ...
5
votes
1answer
757 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 ...
1
vote
0answers
48 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 ...
0
votes
1answer
131 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, ...
0
votes
0answers
180 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
1answer
727 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
1answer
335 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
1answer
26 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
2answers
2k 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 ...
3
votes
1answer
1k views

Replicating results from R pglm (binomial fixed effects model)

Edit: I have updated this question with the solution below: I am trying to understand how pglm estimates fixed effects models for binomial dependent variables by replicating the same model with the ...
0
votes
1answer
364 views

Instrumental variable totally changed the endogenous variables's coefficient

I have a set of panel data and I am adding one instrumental variable to the panel regression. The coefficient for the endogenous variable is -3.8% (p<0.0001) with R^2=20% but after adding the IV ...
1
vote
0answers
142 views

why do lm() and plm() give different Std. errors when combined with vcovHC? And other doubts [closed]

I'm attending an introduction course to econometrics and I have to solve some empirical exercises with r, but I have some doubts. These two formula compute the same coefficients, the same std. Errors ...
0
votes
0answers
130 views

Choosing a panel regression model in R

I am trying to work out how to use panel regression in R and am not sure on whether to use FE, RE, pooling or between models Hello, I am new to panel regression and trying to get my head around it. ...
1
vote
1answer
42 views

Within panel estimator - how to perform standard error adjustment?

I am fitting a within panel model via glm in R and I am trying to understand standard error adjustment as in plm package (to account for loss of degrees of freedom via demeaning): Consider the ...
2
votes
1answer
3k views

r plm time and individual fixed effects - “twoways” vs. factor(index) time

I have an unbalanced panel with weekly data and want to do a panel regression with both, individual and time fixed effects. Following the code in https://www.princeton.edu/~otorres/Panel101R.pdf my ...
2
votes
0answers
520 views

Hausman test showing different results between R and Stata

I ran a Hausman test to compare random and fixed effects regression for a panel dataset in both R and Stata and found that the two are showing different results. The troubling thing is that the Stata ...
1
vote
0answers
466 views

Why does pglm give different results thans log-plm?

I'm looking to regress a fixed-effects model on count data. My initial approach was to take the log of regressor on R's plm package. Then I found out about the pglm package, which enables general ...
0
votes
1answer
300 views

weighted IV estimation by plm

I apply plm package to do fixed effects IV regression but find something which I couldn't understand. Theoretically, if we only have one endogenous variable and one IV, the IV estimator should be ...
1
vote
1answer
2k views

Understanding whether to use two-way effects [duplicate]

Using plmtest, I find that individual effects are significant (p: 7.327e-05); time effects are not significant (p: 0.1263); and two-way effects are significant (p: 0.0001197). Based on these results,...
1
vote
0answers
538 views

Are the standard errors produced by R's plm package for weighted models reliable?

I have a strong feeling there is a bug in R's plm package when it comes to the standard errors of weighted models. I have noticed that the standard errors are not ...
2
votes
0answers
473 views

R | Large-Sample Fixed-Effects Interaction using plm

How can I model Interactions with fixed effects for a large sample using plm? I have a panel data set with > 100,000 observations and I am trying to model a dummy-interaction with one of two fixed ...
2
votes
1answer
3k views

R: Predicting future panel data

I have an unbalanced panel covering the years 2000-2017 for multiple countries (some missings as unbalanced suggests), for which I ran a fixed effects model with plm...
0
votes
1answer
4k views

Clustered standard errors are completely different in R than in STATA

I'm trying to reproduce a study in R. Here are its core elements: study wants to measure the effect of a transit strike on highway delay independent variables: strike: binary dateresidual: ...
9
votes
1answer
681 views

comparing groups in repeated measures FE models, with a nested error component, estimated using plm

I have estimated some repeated measures Fixed Effects models, with a nested error component, based on on grouping variables, i.e. non-nested models, using plm. I am now interested to test if the ...
1
vote
1answer
2k views

Panel linear regression with duplicate time

I am trying to carry out panel linear regression with yield and climate data from an project called ISIMIP. In this project, different groups of scientist running their crop models using the same GCMs ...
3
votes
0answers
248 views

Using interactions with time variable in fixed effects modelling (PLM package R)

I'm trying to run some fixed effects models for housing stress using the PLM package in R. Based on the existing examples/documentation time variables are often used as part of the index to identify ...
3
votes
0answers
51 views

Reference or a mathematical equation for R squared and adjusted R squared for panel models used in the R package plm [duplicate]

I'm using plm in r and I'm trying t o find out exactly how R squared and adjusted R squared is calculated for panel models in ...
3
votes
0answers
610 views

Is it possible to fit a quantile regression fixed effects model on a repeated measures, panel data, with a nested structure?

In the rqpd package manual it is demonstrated how to fit a fixed effects model on a repeated measures data structure. I am looking for ways to extend this to a repeated measures nested structure, i.e. ...
2
votes
1answer
2k views

Using PLM in R for Panel Data

I have a data set of employees who have worked at a company throughout 2017. The data set is broken out month by month; someone can work all 12 months of the year (12 rows) and someone can have worked ...
1
vote
0answers
486 views

Choosing random.method in R's plm

When it comes to estimating a Random Effects model using R’s plm package, one has a number of options under random.method. Specifically, random.method can be set to equal to "swar", "amemiya", "walhus"...