title: How can I manually plot a curve of two continuous predictor variables in separeted graphics?
body: <p>I read some questions about this subject, but I couldn't find an answer.</p>
  
  <p>I have 30 samples and my model is:</p>
  
  <pre><code>y ~ poly(x,3) + z
  </code></pre>
  
  <p>The result is:</p>
  
  <pre><code>           Estimate     SE     Z    P
  
  (Intercept) -2.851  0.234   -12.173  &lt; 0.0001
  poly(x)1    -0.784  1.036   -0.758   0.449
  poly(x)2     1.937  0.845    2.293   0.022 *
  poly(x)3     2.754  0.768    3.587   0.0003 **
  z            0.342  0.105    3.268   0.001 *
  </code></pre>
  
  <p><strong>First</strong>, I've tried to plot the curve using <code>geom_smooth</code>.</p>
  
  <p>a) <code>geom_smooth(method = "betareg", se=FALSE, formula = y ~ poly(x,3))</code></p>
  
  <p>b) <code>geom_smooth(method = "betareg", se=FALSE, formula = y ~ z)</code></p>
  
  <p>Then, I got these graphics: <a href="https://i.stack.imgur.com/PSKNG.png" rel="nofollow noreferrer">https://i.stack.imgur.com/PSKNG.png</a> But, in this case, I didn't consider the real model, but modeled the variables separately, which is probably a wrong way to show the data.</p>
  
  <p><strong>Second</strong>, I tried to use <code>visreg</code>, but it does not work with <code>"poly(x,3)"</code> in the model: "Error in poly(x, 3): 'degree' must be less than number of unique points". If I use <code>"I(x^3)"</code> it works, but it changes the model a little. </p>
  
  <p><strong>Third</strong>, I'm trying to use <code>plogis</code>, but I don't know how can I insert the parameter estimates in the function and then in the ggplot graph.</p>