[R] predict.mvr error message

Stewart T Chang stchang at umich.edu
Thu Aug 26 20:37:46 CEST 2004


I've encountered an error message while using the pls.pcr package
that's left me scratching my head for a couple of hours, and I thought I
might post it here in the hopes that someone else uses this package.
Using a data set of 1350 observations (each observation comprises 180
predictor variables and 1 output variable), I trained a model using
pls.pcr.  (Other details: ncomp=2, method="SIMPLS",validation="none".  I
might also add that each predictor variable has a value of either 0 or 1,
though the output variable is a real number.)
When I tried to use this model to make predictions (on 312 sets of 180
predictor variables), I received the following error:

Error in X %*% object$training$B[, , index, drop = TRUE] :
        requires numeric matrix/vector arguments

Normally I'd ask a friend of mine in Biostatistics here to help me out,
but he's currently away!  Have any of you used pls.pcr and gotten this
kind of message?  Thanks!


More information about the R-help mailing list