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 unbalancedness is taken into account by plm()). The output of the regression seems not to consider the issue.

Please consider the following

# Sample data
df <- WDI(country = c("BR","US", "CA"), start = 2000, end = 2010,
          indicator = c('EN.ATM.CO2E.PC', 'NY.GDP.PCAP.CD'))

# Remove random years
df <- df[-which(df$year==2005),]
    df <- df[-which(df$year==2003),]
df <- df[-which(df$year==2006 & df$country == "Brazil"),]

summary(plm(EN.ATM.CO2E.PC ~ NY.GDP.PCAP.CD, data = df, index = c('country', 'year'),
            method = "within", balanced = FALSE))

which outputs

Oneway (individual) effect Within Model

plm(formula = EN.ATM.CO2E.PC ~ NY.GDP.PCAP.CD, data = df, index = c("country", 
    "year"), method = "within", balanced = FALSE)

Unbalanced Panel: n=3, T=8-9, N=26

Residuals :
   Min. 1st Qu.  Median 3rd Qu.    Max. 
 -1.540  -0.289   0.110   0.543   1.170 

Coefficients :
                  Estimate  Std. Error t-value Pr(>|t|)   
NY.GDP.PCAP.CD -6.8273e-05  2.1762e-05 -3.1373 0.004788 **
Signif. codes:  
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Total Sum of Squares:    16.404
Residual Sum of Squares: 11.333
R-Squared      :  0.3091 
      Adj. R-Squared :  0.26155 
F-statistic: 9.84253 on 1 and 22 DF, p-value: 0.0047884

You are right. Irregularities are not specifially taken into account. The within model just takes the groups means for the demeaning, no matter how many observations there are or if any observations (periods) in between are missing.

By the way, balanced is not an argument to plm(), you do not need to specify whether the data set is balanced or not. plm() will detect it for you.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.