R package primarily concerned with panel data. Package contains a set of estimators and tests for panel data.
Questions tagged [plm]
510 questions
0
votes
2 answers
How do I open a TCSession?
I'm working with Teamcenter and Catia via the Java SOA libraries. I'm running into an issue where the demo code appears broken and I can't find a good example or documentation to work towards. The following code results in a null value exception. …

Aaron Paluzzi
- 1
- 1
- 3
0
votes
1 answer
pdwtest from plm with wrong p-value (and statistic?) for panel models and pooled OLS (Durbin Watson test for autocorrelation)?
I wondered why pdwtest() outputs very differnt p-values compared to either lmtest's and car's Durbin Watson tests (dwtest() and dwt(), respectively). Please find a documentation of the differences below. After that, I provide code I took from plm's…

Helix123
- 3,502
- 2
- 16
- 36
0
votes
1 answer
R - plm regression with time in posix-format
I have little experience with panel data in R, and am trying to run a simple panel regression with the plm-package. When converting my dataframe to a pdata.frame, however, my time index-variable is transformed to a factor variable. This means that…

ageil
- 171
- 1
- 3
- 16
0
votes
1 answer
Error in data.frame(data, index) : variable 'country' does not exist
I am trying to run very simple fixed effect model on a small data set. Sample data set is rather small. I loaded the data via a csv file and then ran plm command. But i am running into an error and i am not able to figure out reason.
My csv file…

harshul gandhi
- 73
- 1
- 10
0
votes
1 answer
How to include a year fixed effect (in a year-quarter panel data) in R using plm function?
Thank you all in advance for your help. My question is essentially a "bump" of the following question: R: plm -- year fixed effects -- year and quarter data.
Basically, I was wondering if there is anyway using the plm function in R to include a…

Vincent
- 7,808
- 13
- 49
- 63
0
votes
1 answer
Random effects model in R - error
I am running econometric model with panel data in R. I am using plm package and pooled model and fixed effects model works great. But I get this error when trying to do random effects model and I don't know how to fix it.
There is my whole dataset…

veyer
- 11
- 2
0
votes
1 answer
How do I name/save a model in R after adding robust standard errors?
How do I name a model after correcting for heteroskedasticity in R? Basically, how do I save a model so that it includes the robust standard errors? I am using the plm package if that makes a difference.
So let's say I have these two models…

NuclearPenguins
- 83
- 1
- 9
0
votes
1 answer
plm package in R Installation error
I get the following error when I try to install plm package on R 3.1.1 with Windows 7.
"Error: package ‘Formula’ required by ‘plm’ could not be found"
I would appreciate any help!

Konsearch
- 1
- 1
0
votes
2 answers
adding lagged variables (t+1), (t+2), (t-1) in panel data
Edit: Trying to implement the solution provided in the answer below.
I'm providing new sample data as it fits very well my data.
> head(Grunfeld, 25)
firm year inv value capital
1 1 1935 317.6 3078.5 2.8
2 1 1936 391.8 4661.7 …

Gritti
- 85
- 3
- 11
0
votes
0 answers
Error in is.constant(y) : (list) object cannot be coerced to type 'double'
I have a sample file that I am using to forecast as a panel series.
The steps followed are
library(plm)
library(Formula)
library(forecast)
library(timeDate)
library(zoo)
df1 <- read.csv("full panel Test Input.csv", header=TRUE, sep=",")
pdf1 <-…
0
votes
1 answer
PLM in R with time invariant variable
I am trying to analyze a panel data which includes observations for each US state collected across 45 years.
I have two predictor variables that vary across time (A,B) and one that does not vary (C). I am especially interested in knowing the effect…

user3524077
- 21
- 4
0
votes
1 answer
Loop through column names in Fixed Effects Regression
I am trying to code a fixed effects regression, but I have MANY dummy variables. Basically, I have 184 variables on the RHS of my equation. Instead of writing this out, I am trying to create a loop that will pass through each column (I have named…

Luna
- 39
- 1
- 5
0
votes
0 answers
plm error variable lengths differ
I'm completely new to R, and I'm trying to run an unbalanced fixed effects model using plm. I'm not sure if this question has been answered as most of the answers on this web site are beyond my technological grasp.
My data is set up in five…
0
votes
1 answer
Pad fitted values of PLM model with NAs
I have the following dataset
seed(1)
dt <- data.frame(name= rep(c("A", "B", "C"), c(9,11,10)),
year=c(2001:2009,2000,2002:2011,2001:2010),
var1=c(NA,rnorm(10),NA,rnorm(18)),
…

Mace
- 1,259
- 4
- 16
- 35
0
votes
2 answers
plm model "within" - Warning messages in R
i have a problem running this plm model:
my data are (example):
country=c(1,1,1,2,2,2,3,3,3)
year=c(1,2,3,1,2,3,1,2,3)
a=c(1,4,6,3,5,8,4,5,7)
b=c(8,5,7,2,7,4,9,7,1)
matrix=cbind(country, year, a, b)
matrix=plm.data(matrix)
I…

user3237581
- 9
- 1