Skip to content

Error of Cross Validation

2 messages · zhu yao, jim holtman

#
You real error was this:

Error in pre[sam[[j]], i] <- predict(fit, data = dat[sam[[j]], ]) :
  number of items to replace is not a multiple of replacement length

Take a look at the statement and you will see that 'predict' is
returning 100 values and you are trying to store it into only 10 rows
(that is what sam[[j]] is).  You need to rethink what you are trying
to do.  Let me ask my favorite question:  what is the problem you are
trying to solve?
On Mon, Jun 20, 2011 at 8:05 AM, zhu yao <mailzhuyao at gmail.com> wrote: