0
$\begingroup$

using the dataset CO2 as an example. After I find the regression lines of uptake and Plant (a factor with 12 levels)

lm(uptake ~ Plant, data = CO2) 

Call:
lm(formula = uptake ~ Plant, data = CO2)

Coefficients:
(Intercept)      Plant.L      Plant.Q  
   27.21310    -22.94230     -4.61669  
    Plant.C      Plant^4      Plant^5  
    4.66802      2.33920      4.31450  
    Plant^6      Plant^7      Plant^8  
   -0.03902     -2.03649     -3.27825  
    Plant^9     Plant^10     Plant^11  
   -9.06702      0.54631      1.91215  

Is there a way I can plot this and add the regression lines to the plot? Plant is a discrete variable, so what should the graph's x axis be? Thanks in advance!

$\endgroup$
  • 2
    $\begingroup$ Could you tell us what you might mean by "regression lines"? That phrase doesn't seem to make any sense for this model. $\endgroup$ – whuber Jun 4 '17 at 19:45
-1
$\begingroup$

You could simply plot this using

plot()

However, I do have to agree with the other comments that you should question whether this makes any sense whatsoever.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.