title: Bivariate partial dependence with randomForest in R
body: <p>I have a dataset with a binary dependent variable and a number of predictors, including participant. I am trying to examine the idiosyncratic effects of different predictors for different participants. In order to do that, I'm trying to look at the effect of interactions between participant id and the other predictors on the dependent variable. I'm using randomForest in R. I can fit the forest successfully, and can produce partial dependence plots for individual variables. What I need, however, are partial dependence plots for pairs of variables - participant + others. Is this possible?</p>
  
  <p>For reference, my code:</p>
  
  <pre><code>data_sample&lt;-data_raw[sample(1:nrow(data_raw),500,replace=F),];
  test_rf&lt;-randomForest(perceptually.rhotic~vowel+speaker+modified_clip_start+function_word+year_of_birth+gender+fathers_job_type+prepausal,data=data_sample,ntree=500,mtry=3);
  partialPlot(test_rf,pred.dat=data_sample,x.var="speaker");
  
  ??? partialPlot(test_rf,pred.dat=data_sample,x.var=c("speaker","vowel"));
  </code></pre>
  
  <p>Thanks very much in advance for any advice anyone can offer!</p>