我想通过使用SampleSelection包的heckit函数进行样本选择更正。
一切正常,直到我将Branche变量添加到我的数据中为止。我收到以下错误:
Lapack routine dgesv: system is exactly singular: U[11,11] = 0
Branche变量的结构如下:
[1] "1"
[2] "Andere Industrien"
[3] "Banken und Versicherungen"
[4] "Bergbau und Energie"
[5] "Chemische Industrie, Holz, Papier"
[6] "Groß-und Einzelhandel"
[7] "Kleidung"
[8] "Land- und Forstwirtschaft"
[9] "Maschinenbau (darunter auch Automobilindustrie)"
[10] "private und öffentliche Dienstleistungen"
[11] "Ton, Steine, Erden, Bau,Eisen, Stahl, Schwerindustrie"
[12] "Zug, Post, Kommunikation,Verkehr"
$class
[1] "factor"
Branche变量描述此人在哪个部门工作。对于不工作并参与= 0的人,我在此变量中没有任何信息,因此将其编码为1。我自己创建了整个变量
现在如果我跑步
heck1 = heckit( lfp ~ age + I( age^2 ) + kids5 + huswage + educ,
log(wage) ~ educ + exper + I( exper^2 ) + city + Branche, data=Mroz87)
我收到上述错误消息。我认为这与1.有关。
我该如何解决这个问题?