title: Predicted lines for model with multiple explanatory variables on ggplot2
body: <p>My question is the following of this <a href="https://stackoverflow.com/questions/18506201/re-transform-a-linear-model-case-study-with-r">question</a> I asked some hours ago. Looking at this post will help a lot understanding the question that follows.</p>
  
  <p>I make a model with 1 response variable and 2 explanatory variables, one of them being a factor.</p>
  
  <p>In my model, the response variable is transformed. I'd like to display on a graph my variables but I want the explanatory variable not to be transformed. Moreover I'd like to add the predicted line given by my model which for this purpose should be back-transformed! And to add one more slight difficulty I'd like to do it on a ggplot.</p>
  
  <p>My question is <strong>how can I extend <a href="https://stackoverflow.com/questions/18506201/re-transform-a-linear-model-case-study-with-r">@Roland's solution</a> to ggplot and to several explanatory variables?</strong></p>
  
  <p>Here is an example:</p>
  
  <p>set.seed(12)</p>
  
  <pre><code>resp = (rnorm(120)+20)^3.79
  expl1 = rep(c(1,2,3,4),30)
  expl2 = rep(1:3,40)
  df = data.frame(resp=resp,expl1=expl1,expl2=expl2)
  
  m=lm(resp~expl1*factor(expl2), data=df)
  ggplot(data=df,aes(y=resp,x=expl1,shape=factor(expl2)))+geom_point() + geom_smooth(se=F)
  </code></pre>
  
  <p>Instead of the lines that are displayed I'd like to have the predicted values of my model after back-transformation. I could add <code>method='lm', formula =resp~expl1*factor(expl2)</code> in <code>geom_smooth</code> but whether I transform or not <code>resp</code>I will the same problem. Either the line does not fit because transformed, or it doesn't correspond to my model.</p>
  
  <p>Hope my question makes sense! Thanks for your help!</p>