Questions tagged [plm]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
18 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
170 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
16 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
54 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
55 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 ...
0
votes
0answers
100 views

Detecting outliers and influencial cases in R (plm)

when performing a multiple linear regression, the checking of outliers and influential observations is considered important. Since I am performing a panel analysis with the package 'plm' and have not ...
5
votes
1answer
204 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
101 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
0answers
19 views

Cluster Standard errors with plm at higher level than group

my model suffers from autocorrelation, thus I wanted to cluster the SEs. I have firm level, industry level and country level observations in my model. A paper that I am following clustered the Ses at ...
0
votes
1answer
22 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
275 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 ...
0
votes
0answers
73 views

Difference between Breusch-Pagan test and Honda's test for time fixed effects in plmtest

I am trying to decide whether to include time fixed effects in my model. ...
0
votes
0answers
23 views

lost significance when using robust errors in panel data analists

I am doing my first econometric analysis and I am in doubt if I have done something wrong, as I get unexpected results. I am using the WHO health data referenced in this assignment:http://people....
0
votes
0answers
26 views

Regression with panel data on multiple levels (country-regional-individual)

I have a large (panel) data set with information on the individual, regional and country level, (mostly) for two time periods. Apart from the fact that I need to cluster the sd's from regional and ...
3
votes
1answer
340 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
115 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
51 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
83 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. ...
0
votes
1answer
26 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
1k 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
381 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
346 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
221 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
1k 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
360 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 ...
1
vote
0answers
322 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
2k 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
3k 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: ...
8
votes
1answer
486 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
673 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 ...
2
votes
0answers
166 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
46 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
446 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
1k 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
299 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"...
1
vote
0answers
226 views

Predicting Outcome Variable for out-of-sample Panel data R

I have data for population, income and price of cheese in 139 countries from 2007 to 2017. The objective is to find the price of bread in a new country X where I have data on the population and ...
1
vote
0answers
193 views

gmm (Generalized Method of Moment) versus pgmm (Generalized Method of Moment for Panel Data) in R programming

I would like to know when I should apply gmm (generalized method of moment from 'gmm' package) or pgmm (generalized method of moment from 'plm' package) in R programming for each of the following case:...
0
votes
0answers
284 views

Modifying sensitivity to multicollinearity in plm function in R

The plm() function, which is part of the plm package, in R drops variables that are near-collinear to avoid singularities. Stata's xtreg does the same, but either uses different thresholds or a ...
1
vote
0answers
821 views

Running a Panel Regression in R - What is the “Between” model?

I'm running regressions on an unbalanced panel dataset. I've ran panel regressions in other software, but this is my first time in R. I have a question about the "between" model in the PLM ...
2
votes
0answers
312 views

Unbalanced panel with one-way random effects a la Swamy/Arora

The one-way random effects model for balanced data as described by Swamy/Arora (1978) is extended to the unbalanced case in Baltagi/Chang (1994) (another exposition is in Baltagi's text book). Various ...
1
vote
0answers
511 views

prediction using plm for out of sample data in R

I want to predict out of sample data for the same group (lets say state ) for new time window by either fixed or random method.."predict" function is not helping.Here i gave a example of a dataset ...
0
votes
1answer
2k views

What does the intercept mean in a first-difference panel-data model (r-plm)?

Using unbalanced panel-data (Unbalanced Panel: n=54, T=81-307, N=11138), I estimated both FE and FD models. My understanding that they are analogous for T>2 and if they produce different results, then ...
1
vote
1answer
1k views

How to do likelihood ratio test to compare two panel models (plm) in R

I have a problem to run a likelihood ratio test to compare two panel regression models in order to find whether one model is significantly better than the another one. However, neither lrtest nor ...
1
vote
1answer
637 views

Replication of results from example in “Econometric Analysis of Panel Data”

In the textbook Econometric Analysis of Panel Data by Badi H. Baltagi is an example for a dynamic panel data analysis. It is based on the two articles: Baltagi, Badi H., James M. Griffin, and Weiwen ...
0
votes
1answer
927 views

How can I find a specific variable coefficient for an individual in a fixed effects model?

I have specified the following model in R using the plm package. ...
0
votes
3answers
1k views

Understanding the output of a fixed-effects-model in R

I am researching whether female representation changes the innovation output of companies. I have panel data of 30 companies over 10 years and "diversity, sales, r&dbudget, #employees" as my ...
3
votes
1answer
1k views

Breusch-Godfrey autocorrelation test: bgtest for panel data yields different results than pbgtest

I have a panel data containing 12 different years, many id:s per year (some id:s missing in some years..unbalanced panel) and many variables. I'd like to test for auto correlation and I have run some ...
1
vote
1answer
649 views

R, plm, fitted values [closed]

I try to use a GoF measure called MAPE mean absolute percentage error, I know there are some related answers that a$model[[1]]-a$residuals is the best way in the ...
2
votes
0answers
255 views

Should I check for residual normality in panel data?

I'm running a random effects model in R on a large panel. The main specification uses 132 observations. Should I check for residual normality? If I have to, what package/function should I use? ...
0
votes
0answers
4k views

Adding year dummy to a fixed-effect model for <monthly> panel-data

Working with a panel dataset (n=50 units, t=20 years at the monthly level = 240), I am fitting a fixed-effects model while controlling for the seasonality by monthly dummy variables. I defined the ...