On Fri, 2006-04-28 at 11:17 -0700, Sachin J wrote:> Hi,
>
> I am trying to use rm.outlier method but encountering following error:
>
> > y <- rnorm(100)
> > rm.outlier(y)
>
> Error:
> Error in if (nrow(x) != ncol(x)) stop("x must be a square
matrix") :
> argument is of length zero
>
> Whats wrong here?
>
> TIA
> Sachin
It would be helpful to know which rm.outlier() function you are using
and from which package it comes.
The only one that I noted in a search is in the 'outliers' CRAN package
and it can take a vector as the 'x' argument.
The above square matrix test and resultant error message is not in the
tarball R code for either outlier() or rm.outlier() in that package, so
the source of the error is unclear.
As an aside, you may wish to consider robust analytic methods rather
than doing post hoc outlier removal. A search of the list archives will
provide some insights here. RSiteSearch("outlier") will get you there.
HTH,
Marc Schwartz