Predict the Petal Width of Iris Flowers Based on Input Features
Built using R Shiny, linear models, and interactive UI
Built using R Shiny, linear models, and interactive UI
model <- lm(Petal.Width ~ Sepal.Width + Sepal.Length + Petal.Length + Species, data = iris) summary(model)
## ## Call: ## lm(formula = Petal.Width ~ Sepal.Width + Sepal.Length + Petal.Length + ## Species, data = iris) ## ## Residuals: ## Min 1Q Median 3Q Max ## -0.59239 -0.08288 -0.01349 0.08773 0.45239 ## ## Coefficients: ## Estimate Std. Error t value Pr(>|t|) ## (Intercept) -0.47314 0.17659 -2.679 0.00824 ** ## Sepal.Width 0.24220 0.04776 5.072 1.20e-06 *** ## Sepal.Length -0.09293 0.04458 -2.084 0.03889 * ## Petal.Length 0.24220 0.04884 4.959 1.97e-06 *** ## Speciesversicolor 0.64811 0.12314 5.263 5.04e-07 *** ## Speciesvirginica 1.04637 0.16548 6.323 3.03e-09 *** ## --- ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 ## ## Residual standard error: 0.1666 on 144 degrees of freedom ## Multiple R-squared: 0.9538, Adjusted R-squared: 0.9522 ## F-statistic: 594.9 on 5 and 144 DF, p-value: < 2.2e-16