[R] ignoring some constants
ripley@stats.ox.ac.uk
ripley at stats.ox.ac.uk
Thu May 30 19:17:51 CEST 2002
On Thu, 30 May 2002, Rishabh Gupta wrote:
> Hi all,
> I'm trying to use the lda function from the MASS library to perform a discrimant analysis. The problem is that some of the
> variables within the data set are constant with relative to grouping variables and the function gives an error. So when I use the
> function as:
>
> > lda(d[11:14], d$set)
>
> where d is the data object, [11:21] is the range of the variables to be analysed, d$set is the grouping variable. It give the
> following error:
>
> Error in lda.default(structure(data.matrix(x), class = "matrix"), ...) :
> variable(s) 1 2 3 4 appear to be constant within groups
>
> Is there anyway that I can get the function to just ignore this error since there are some variables that are not constant within
> the groups. As far as I am concerned, the results are not an error and are just part of the data.
Try ?lda to improve your understanding.
--
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 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list