The following code generates a qudaratic regression in R.

```
 lm.out3 = lm(listOfDataFrames1$avgTime ~ listOfDataFrames1$betaexit + I(listOfDataFrames1$betaexit^2) + I(listOfDataFrames1$betaexit^3))

 summary(lm.out3)

Call:
lm(formula = listOfDataFrames1$avgTime ~ listOfDataFrames1$betaexit + 
    I(listOfDataFrames1$betaexit^2) + I(listOfDataFrames1$betaexit^3))

Residuals:
    Min      1Q  Median      3Q     Max 
-14.168  -2.923  -1.435   2.459  28.429 

Coefficients:
                                 Estimate Std. Error t value Pr(>|t|)    
(Intercept)                        199.41      11.13  17.913  < 2e-16 ***
listOfDataFrames1$betaexit       -3982.03     449.49  -8.859 1.14e-12 ***
I(listOfDataFrames1$betaexit^2)  32630.86    5370.27   6.076 7.87e-08 ***
I(listOfDataFrames1$betaexit^3) -93042.90   19521.05  -4.766 1.15e-05 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 7.254 on 63 degrees of freedom
Multiple R-squared:  0.9302,    Adjusted R-squared:  0.9269 
F-statistic: 279.8 on 3 and 63 DF,  p-value: < 2.2e-16

```

But how to do I plot the curve on the graph am confused.

To get graph:

```
 plot(listOfDataFrames1$avgTime~listOfDataFrames1$betaexit)

```

But curve?

---

Is there any to do it without manually copying the values?
Like mso suggested though it works.