[R] Troubles with subset()

Milan Bouchet-Valat nalimilan at club.fr
Tue Dec 11 17:02:11 CET 2012


Le mardi 11 décembre 2012 à 15:09 +0100, Virgile Capo-Chichi a écrit :
> All,
> I have the attached dataset which I read from SPSS and transformed a little
> bit using the attached script. I am trying to run a logistic regression
> using glm() on a subset of my data. When I run the logistic regression on
> the whle dataset, it runs OK. As soon as I try to run on the subset, I get
> an error message related to different lengths of variables. Any idea why
> this might be so? Thanks for your inputs. V
Please paste the code, as it was removed by the server.

Most likely, it comes from the fact that some terms in the formula refer
to variables in the 'data' argument, and some do not.


Regards




More information about the R-help mailing list