library(sampleSelection) #estimar Heckman versao 2 estagios res<-selection(inlf~educ+exper+I(exper^2)+nwifeinc+age+kidslt6+kidsge6,log(wage)~educ+exper+I(exper^2),data=MROZ, method="2step") summary(res) #estimar Heckman versao ML res1<-selection(inlf~educ+exper+I(exper^2)+nwifeinc+age+kidslt6+kidsge6,log(wage)~educ+exper+I(exper^2),data=MROZ, method="ml") summary(res1)