[R-sig-eco] NA as a result of using GLM

Gavin Simpson gavin.simpson at ucl.ac.uk
Mon Jun 15 15:02:59 CEST 2009


On Mon, 2009-06-15 at 12:46 +0200, poleteiep34 wrote:
> Hi all!
> Maybe someone could help me with the following. I know this hasn't
> directly to do with ecology but I'm also using glm.
>  
> I have a list of 16 genes and 10 samples. The samples are of two
> types, 4 Ctrl and 6 Diseased. If,
> 
> labelInd<-as.factor(c(rep("0",4),rep("1",6)))
> genes.glm<-glm(labelInd ~ ., family=binomial, data=mat)
> 
> 
> beeing "mat" the 10x16 matrix (without NAs), I got 17 values, first
> the intercept, 9 numerical values and "NA" for the last 7 genes. Does
> anybody you know why this is happening or how I can model using the 16
> genes?

You don't have enough observations to use all 16 predictors plus
intercept, if you really only have 10 samples. The NA coefficients are
the one that can't be estimated given your observations.

You'll need to rethink how to analyse these data.

G

> 
> I hope anyone could help me with this!
> Many thanks in advance,
> 
> Paul
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-sig-ecology mailing list