Calculate RMSE
rmse.RdCalculate the Root Mean Square Error (RMSE). The RMSE is the standard deviation of the residuals (prediction errors) and therefore an indicator of how precise the prediction of a specific vote actually is.
Examples
# Set seed for reproducibility
set.seed(42)
pred_data <- predict_votes(c("Eidg1", "Kant1"), vote_data, exclude_votes = TRUE)
pred_data$rmse <- rmse(pred_data$pred, pred_data$real)