I get a warning message from the plm package in R when I perform ´summary()´ of a model:
1: In Ops.pseries(y, bX) : indexes of pseries have same length but not same content: result was assigned first operand's index 2: In Ops.pseries(y, bX) : indexes of pseries have same length but not same content: result was assigned first operand's index
I used the following code:
library(dplyr)
library(lubridate)
library(plm)
data <- data.frame(ID = rep(c("123456", "234567", "345678", "456789", "567890", "678901", "789012", "890123", "901234","9012345"), each = 24),
month = rep(seq(dmy("01.01.2019"), dmy("01.12.2020"), by = "1 months"),10), group = rep(c(rep(T, 12), rep(F, 12)), 10),
temperature = runif(24*10, 0, 1)) %>%
group_by(ID, group) %>% mutate(consumption = ifelse(group, runif(12, 1,2), runif(12,2,3)))
pdata <- pdata.frame(x = data, index = c("ID", "month"))
model <- plm(formula = consumption ~ group + temperature, data = pdata, effect = "individual", model = "within")
summary(model)
## Warnmeldungen:
## 1: In Ops.pseries(y, bX) :
## indexes of pseries have same length but not same content: result was assigned first operand's index
## 2: In Ops.pseries(y, bX) :
## indexes of pseries have same length but not same content: result was assigned first operand's index
My thought was that it could be one of the two indices. However, I get the same warning message when I either use "ID" or "month" as index.