Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [plm]

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

0
votes
0answers
30 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
0answers
19 views

Error Using Interaction Effect Between Individual and Time Fixed Effects

I am trying to run a two-way fixed effects model with an instrument using the plm function: ...
0
votes
1answer
57 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 ...
0
votes
0answers
32 views

R square for fixed model is worse than OLS in panel model

I am analysing panel data and using the plm package in R. I'm using the plmtest, pFtest, phtest functions which indicate to me that fixed effects model should be used over the pooled OLS and random ...
1
vote
1answer
290 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
141 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
113 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
406 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
833 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: ...
0
votes
0answers
85 views

moderators, control variables and time-fixed effects for panel data using plm package

I have panel data that consists of 33 companies, 70 CEOs and 30 years. I want to measure the effects CEO narcissism (=x) has on the internationalization (= y) of companies. the fixed effects model is ...
8
votes
1answer
216 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
0answers
95 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 ...
1
vote
0answers
49 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
43 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
234 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. ...
1
vote
1answer
356 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
152 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
119 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
93 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
139 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
582 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
164 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
362 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
850 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 ...
0
votes
1answer
723 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
416 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
511 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
468 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
525 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
431 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
173 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
2k 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 ...
1
vote
1answer
817 views

Test Excluded Instrument in R PLM package

I have to run a regression to estimate the impact of an endogenous variable. There are many packages for this in R (e.g., AER, sem, etc). Since I have an unbalanced panel, in order to obtain a robust ...
54
votes
5answers
5k views

How exactly does a “random effects model” in econometrics relate to mixed models outside of econometrics?

I used to think that "random effects model" in econometrics corresponds to a "mixed model with random intercept" outside of econometrics, but now I am not sure. Does it? Econometrics uses terms like "...
4
votes
0answers
859 views

How to properly use generalized method of moments (GMM) estimation with plm in R?

In the context of panel data analysis my key independent variable wage affects the response not immediately but rather over time. Therefore I would like to use some ...
1
vote
0answers
309 views

How can I apply weights to the cross-sectional dimension in a fixed effect panel model?

I have a balanced panel dataset in which I have observations for N countries across T quarters. I use a fixed effect model to explore the relationship between my variables. Since all countries have ...
0
votes
1answer
1k views

How exactly does the PLM package in R create lags?

I'm trying to understand the difference between XTREG and PLM. First, I have looked at this answered question: Difference between fixed effects models in R (plm) and Stata (xtreg) But when I try ...
2
votes
1answer
699 views

PLM: Keep dummy variable in Fixed Effects / Random Effects analysis

I have a short panel dataset that I want to analyze. It contains panel data of multiple individuals. Each individual is assigned to 1 of 4 treatment groups and I am interested in the effect of these ...
-1
votes
1answer
404 views

Cross-sectional independence tests returning p-value NA

I'm a Master student researching for his thesis. In a panel data analysis, I have a sample of 141 observations related to airports. First lines are: ...
3
votes
1answer
315 views

Forecasting elections by using survey data (in R)

In advance: my sincere apologies for any incompleteness, lack of knowledge and general stupidity in this post. I am doing my ultimate best to be as complete and thorough as possible - but I could ...
0
votes
1answer
1k views

Cluster definition in vcovHC

I'm running a regression in R's plm package similar to this post Clustered standard errors in R using plm (with fixed effects). I.e. panel data with fixed effects ...
2
votes
1answer
551 views

Including time-varying regional fixed effects in Arellano-Bond estimation (R plm package)

I want to estimate a dynamic panel model with firm level time invariant fixed effects and time-varying regional fixed effects. I'm trying to implement this with R package ...
1
vote
1answer
562 views

Which test statistic to use to test for cross-sectional dependence in panel data (R, plm)?

I would like to test for cross-sectionally dependent residuals in my panelmodel (pooled). I found pcdtest() in plm package and tried ...
1
vote
1answer
1k views

Fixed and time effects - R plm() vs. Stata xtreg

I have to do some panel regressions and because I received the data as an .dta stata file, I first ran all regressions in Stata and all went fine. Later I wanted to reproduce these regressions in R ...
3
votes
2answers
1k views

Package plm random effect residuals

Simply put, I'd like to know how the plm package in R calculates the residuals of a random-effect regression. I ask this because i'm getting some "weird" outputs. Let-me reproduce them here using the ...
0
votes
1answer
78 views

plm: Implication of irregularly lagged time series

I have an irregularly lagged and unbalanced time series. I want to run a regression fixed effect regression on my data but I'm not totally sure of the implication of the irregular intervals (the ...
0
votes
1answer
530 views

Error in plm random effects Swamy–Arora (swar) estimator with lagged dependent

I am using synthetic data with a model that has a lagged dependent variable. When estimating a random effects model using Swamy–Arora estimator (default) with package plm, I get the error ...
2
votes
0answers
162 views

Linear model with proportions as the dependent variable

I have a linear model where the dependent model is a proportion (or a probability). I know I should probably use another type of model, and I am. I would still like to use also a linear model because ...
3
votes
2answers
1k views

Model approach for count data with a large range of y values

I am modeling ridership data for specific routes by month over a number of years. Some routes have as little as about 1000 riders per month while other routes may have over 20,000 riders per month. ...
2
votes
0answers
841 views

System exactly singular with pgmm (package plm)

this is my first post, I'll do my best to be clear and complete. I am trying to run a pgmm regression (Arellano Bond estimator) following the example online with the EmplUK dataset. My dataset is ...