Good Day, I believe this issue is more of a lack of understand of R (as I have never used it till recently) than anything else. What I am looking for is references, or documents to help me solve my problem.

I have a set of data that I created a pair of decision tress on (pruned and unpruned). I did this using Weka and 10-fold cross-validation. There was no problem here. I got a higher accuracy for the pruned tree and I have individual accuracies for each of the ten folds.

I am now working on doing statistical testing to these two trees, I want to do a T-Test and the Wilcoxon test. It was suggested that I use the


function for the cross-validation, but I can already do this in weka. For the actual stat tests I can do the t-test similar to the example here by manually feeding the values from the individual fold-tests similar to what is in the code in that example. The Wilcoxon test is what is throwing me off. I found this example but I was told to use the function


in the DMwR package. I looked at the documentation for it and I do not quite understand it. It says to feed in the results from experiemntalComparison() for the first value, which means I should be doing my cross-validation with that function (vs. weka). I am not understanding how to get the "trees" I made in weka this function. The documentation refers to some usermade class cv.rpartXse. So I am stumped, being new to this language, on how to accomplish these statistical tests via R.


1 Answer 1


Recommend the following from the http://cran.r-project.org/ site. Select manuals from the left menu bar and open An Introduction to R. While this may cover more than you want, it is kept current with the latest released R core package.

Now select contrib from the left menu bar. Here I suggest you look at several of the offered documents until you find one whose presentation is the clearest for you.

As a side note. If you have two data vectors x and y then then t.test(x,y) will do the two sample t test. Input ?t.test for information about the options.

And wilcox.test(x,y) will do a two sample wilcoxen test. Again use ?wilcox.test for details about the options.

  • $\begingroup$ Thanks a lot. I saw these earlier and they look quite simple, much easier than the suggested compAnalysis() and experimentalComparison() functions I was suggested to use. Do you know why those might have been of any use? $\endgroup$ Sep 26, 2012 at 16:50
  • $\begingroup$ Without data context information, I am assuming that you were being directed to bootstrap/jackknife/resampling or simulation to provide parameter estimates. $\endgroup$ Sep 26, 2012 at 19:34
  • $\begingroup$ Thanks, our data that we were provided was in a big .arff file. That's more weka where I am analyzing it and feeding the answers manually into R. $\endgroup$ Sep 27, 2012 at 2:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.