[R] Error in solve.default message using lme
Bert Gunter
gunter.berton at gene.com
Mon Jan 14 19:04:57 CET 2008
What it probably means is that you can't make a silk purse out of a sow's
ear: all those missings in your your data do not allow you to estimate the
model(s) that you've specified.
If you don't know what this means, I suggest you seek the help of a local
statistician.
--
Bert Gunter
Genentech
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Leonardo
Sent: Monday, January 14, 2008 8:51 AM
To: r-help at r-project.org
Subject: [R] Error in solve.default message using lme
Dear All,
Im using lme to analyze a time series gene expression data. I dont have
all animals in all times, the number of animals in each time is different
and I have lots of NA values.
An example file can be downloaded at lbmp.fcav.unesp.br/leonardo and the
code used is the following:
teste<-read.table(file='example.csv',sep=',',header=T)
B<-1366
library(nlme)
pValueTime<-matrix(nrow=B,ncol=2)
colnames(pValueTime)<-c('geneID','pValue.Time')
for (i in 1:B) {
print(i)
gene = teste$gene [i]
keep<-teste$gene==gene
MTemp =as.numeric( teste$M [keep])
timeTemp = as.factor(teste$time [keep])
animalTemp = as.factor(teste$animal [keep])
tempMM.HA<-lme(MTemp~timeTemp,random=~1|animalTemp,method='ML',
na.action=na.omit)
tempMM.H0<-lme(MTemp~1,random=~1|animalTemp,method='ML',
na.action=na.omit)
pValueTime[i,1]<-gene
pValueTime[i,2]<-anova(tempMM.HA,tempMM.H0)[2,9]
}
Im getting the following error message:
Error in solve.default(estimates[dimE[1] - (p:1), dimE[2] - (p:1), drop =
FALSE]) :
system is computationally singular: reciprocal condition number =
1.64483e-17
I dont know what this message means, so any help/suggestion will be very
appreciated.
sessionInfo()
R version 2.6.0 (2007-10-03)
i386-pc-mingw32
locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] nlme_3.1-86
loaded via a namespace (and not attached):
[1] grid_2.6.0 lattice_0.17-2 tools_2.6.0
Best regards,
Leonardo
____________________________________
MSc. Leonardo Bernardes da Rocha
Doctorate Student - Animal Science
Department of Tecnology
College of Agricultural and Veterinary Sciences
São Paulo State University
Jaboticabal, SP - Brazil
Phone: +55 16 32092675 (Ext. 206)
Email: leonardo.rocha at posgrad.fcav.unesp.br
More information about the R-help
mailing list