我正在使用plm使用固定效应回归模型。 的模型看起来像这样: FE.model <-plm(fml, data = data.reg2,
index=c('Site.ID','date.hour'), # cross section ID and time series ID
model='within', #coefficients are fixed
使用不同的数据源,我编写了一个小函数,该函数创建一个标准错误,t统计量和标准错误表,该表根据组后变量“cluster”线性回归模型。代码如下所示 cl1 <- function(modl,clust) {
# model is the regression model
# clust is the clustervariable
# id is a unique identifier in