title: calculate MSE for training set that's missing the response variable
body: <p>I have a training set with a response variable ViolentCrimesPerPop, and I purposely fit a large regression tree with control </p>
  
  <p><code>control1 &lt;- rpart.control(minsplit=2, cp=1e-8, xval=20)</code></p>
  
  <p><code>train_control &lt;- rpart(ViolentCrimesPerPop ~ ., data=train, method='anova', control=control1)</code></p>
  
  <p>then i use it to predict the testing set</p>
  
  <p><code>predict1 &lt;- predict(train_control, newdata=test)</code></p>
  
  <p>however I'm not sure how to compute the mean square error of the test set because it requires the response variable ViolentCrimesPerPop, which is not given in the test set. Can someone give me a hint on how to approach this problem? </p>