2020 6 26

diamond plot by using plot_ly

diamond regression model

This is a diamond regression model

fitMod<-lm(price~carat+cut,data=diamonds)

summary(fitMod)$coef

##                Estimate Std. Error     t value      Pr(>|t|)
## (Intercept) -2701.37602   15.43108 -175.060759  0.000000e+00
## carat        7871.08213   13.97963  563.039505  0.000000e+00
## cut.L        1239.80045   26.10004   47.501852  0.000000e+00
## cut.Q        -528.59779   23.13239  -22.850983 5.040203e-115
## cut.C         367.90995   20.21416   18.200609  8.496080e-74
## cut^4          74.59427   16.23958    4.593361  4.371486e-06

Results

We can figure out that carat and cut are quite good predictors from regression result

Thank you