Skip to content

prediction error for test set-cross validation

3 messages · Mehmet U Ayvaci, Uwe Ligges, Frank E Harrell Jr

#
Mehmet U Ayvaci wrote:
Well, if "MaSz takes 3 different values in the trainset vs. 4 different 
ones in the testSet", then you won't even be able to calculate it by 
hand, because you got no coefficients for the 4th level of that factor.
Either you need the data to estimate coefficients from or you cannot 
predict.

Uwe Ligges
#
Uwe Ligges wrote:
And note that your test sample is far too small to yield reliable 
results.  You need to use resampling (e.g., bootstrap or 50-fold repeats 
of 10-fold cross-validation).  See the validate function in the Design 
package.  Note that validate does not implement the proportion 
classified correctly because this is an improper scoring rule with 
minimum information/lowest precision/lowest power.

Frank Harrell