On Tue, 13 May 2008, Diego Cesar wrote:
> Hello guys, i looked over the archive files and found nothing about this
> kind of error.
It's a feature.
> I have a database of 33 elements described in 8 variables, i'm using
the
> Leave-One-Out iterative process
> to take one of the elements to be the test element and make a regression
> with the other 32 and then
> I try to predict the clas of the element out.
>
> I'm using this call as a part of a Leave-One-Out experiment:
>
> glmresult <- glm(Y ~ x1+x2+x3+x4+x5+x6+x7+x8, family=binomial,
> control=glm.control(epsilon = 1e-8, maxit = 100, trace = FALSE))
>
> but when i look at the coefficients with:
>
> coef(glmresult)
>
> Everything goes well (i get all the coefficients) until the 27th element
> which gets a NA as a coefficient to variable x8
>
> The vectors Y, x1,x2,x3,x4,x5,x6,x7,x8 have the same length and there
isn't
> any missing data.
>
> don't know what to do right now as i already reviewed the code a lot
and i'm
> starting to think the problem is in the
> data.
Correct, collinearity aka extrinsic aliasing. x8 is not linearly
independent of (1, x1 ... x7) on your dataset and so is dropped from the
model.
> Diego Cesar
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595