jeudi 27 septembre 2018

the condition has length > 1 and only the first element will be used >

i have a problem i'm try to make a LM whit one condition if P6020==2 do the Lm, Here my code: tretorno= if(P6220==5)lm (lsalario[lsalario!=NA|lsalario!=-Inf]~educacion+exptrabajo+exptrabajo2+edad+edad2+genero+genxedu+estrato+cursos+subsidios,weights=factor)

But R says : Warning message: In if (P6220 == 5) lm(lsalario[lsalario != NA | lsalario != -Inf] ~ : the condition has length > 1 and only the first element will be used

Can some help me

Aucun commentaire:

Enregistrer un commentaire