出現問題Error in !class_ind : invalid argument type

569 views
Skip to first unread message

mike092...@hotmail.com

unread,
Oct 16, 2014, 9:45:04 PM10/16/14
to taiwa...@googlegroups.com
不好意思,想請教大家

我之前跑pgmm與plm的範例一

data("EmplUK", package = "plm")

z1 <- pgmm(log(emp) ~ lag(log(emp), 1:2) + lag(log(wage), 0:1)+ log(capital) + lag(log(output), 0:1) | lag(log(emp), 2:99),data = EmplUK, effect = "twoways", model = "twosteps")

summary(z1)

明明只是將範例貼上於R軟體中

結果有時可以跑,有時卻會出現

Error in !class_ind : invalid argument type

實在不知道是哪裡有問題,讓我非常困擾

希望有人能幫我解決 

非常感謝

He-chien Tsai

unread,
Oct 17, 2014, 9:24:54 AM10/17/14
to taiwa...@googlegroups.com
這樣看來像是樣本沒清乾淨, 可能有些資料有混到NaN或其他型別去, 才會有不正確的型別輸入, 再加上算法本身是隨機算法, 有時後會抽到不乾淨的資料有時候不會


mike092...@hotmail.com於 2014年10月17日星期五UTC+8上午9時45分04秒寫道:
Reply all
Reply to author
Forward
0 new messages