[R] loess parameters

Thomas Jagoe tjagoe at liverpool.ac.uk
Wed Mar 24 13:46:04 CET 2004

I have been successfully using the loess function for normalisation of a 2D
array set.
We have recently improved the quality criteria for the data and the numbers
of data points has been reduced to around from around 1000 to 700.
Previously the following would return the loess normalised values for
array$logratio but I am now getting an error:

> array <- read.table("A1.txt", header=T, sep="\t")
> array$logratio<-array$logs555-array$logs647
> array$logav<-(array$logs555+array$logs647)/2
> library(modreg)
> loess2d<-loess(logratio~x+y,data=array)
> array$logratio2DLoeNorm <-array$logratio - predict(loess2d, array)
Error in vector("double", length) : negative length vectors are not allowed

I am assuming that this is due to a problem fitting the data at some
locations and I have tried altering span without much success.  Can anyone
please advise ?

With thanks


More information about the R-help mailing list