What is a dimnames error when estimating GLS?

房东的猫 提交于 2019-12-13 04:06:06

问题


I've Googled around quite a bit and can't find documentation on this. I'm trying to estimate a feasible generalized least squares (FGLS) model on cross-sectional time series data in R. For example:

library(nlme)
foo <- gls(Y ~ factor(panel_ID) + X1 + X2, data = myData,
           correlation=corARMA(p=1), method='ML', na.action=na.pass)

When I run this (my data frame is quite large, which is why I don't include it here), I get the following error:

# Error in array(c(X, y), c(N, ncol(X) + 1), list(row.names(dataMod), c(colnames(X),  : 
#  length of 'dimnames' [1] not equal to array extent</code>

Is anyone familiar enough with the internal workings of gls or the nlme package in general to tell me what I'm doing wrong here? Or suggest another way to go about this (I've also tried the plm package)?

来源:https://stackoverflow.com/questions/9592415/what-is-a-dimnames-error-when-estimating-gls

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!