我在回归之前使用此命令,因为我只需要正收入:
pnad <-subset(dados, renda_mref_trab_pri_sref > 0)
我的命令是:
mqo_mincer_homem <-lm(formula = log(renda_trab_pri_10/(horas_trab_pri_sref*4)) ~ anos_educ + exper + exper_sq + d_bca + d_agro + d_indu + d_serv + d_apub + d_formal + d_rural + d_no + d_se + d_su + d_co , data=subset(dados, d_fem==0))
lm.fit中的错误(x,y,偏移=偏移,singular.ok = singular.ok,...) 0个非na案例
我尝试了所有na.option
并为回归中使用的每个术语设置了sum(is.na("variable"))
,并且不再有NA:
sum(is.na("idade"))
[1] 0
sum(is.na("dados$renda_trab_pri_10"))
[1] 0
sum(is.na("dados$horas_trab_pri_sref"))
[1] 0
sum(is.na("idade"))
[1] 0
sum(is.na("dados$renda_trab_pri_10"))
[1] 0
sum(is.na("dados$horas_trab_pri_sref"))
[1] 0
sum(is.na("anos_educ"))
[1] 0
sum(is.na("ativ_emp_trab_pri_sref_10"))
[1] 0
sum(is.na("pos_ocup_sref"))
[1] 0
sum(is.na("exper_sq"))
[1] 0
sum(is.na("d_bca"))
[1] 0
sum(is.na("d_agro"))
[1] 0
sum(is.na("d_indu"))
[1] 0
sum(is.na("d_serv"))
[1] 0
sum(is.na("d_apub"))
[1] 0
sum(is.na("d_no"))
[1] 0
sum(is.na("d_se"))
[1] 0
sum(is.na("d_su"))
[1] 0
sum(is.na("d_co"))
[1] 0
无论如何,该命令仍会返回相同的错误消息
我可能做错了什么?