FQ3.docx - FQ3 Shashaank abstract =...

This preview shows page 1 - 3 out of 4 pages.

FQ3 Shashaank 2020-10-12 abstract = read.csv ( "iris_exams.csv" ) summary (abstract) ## id Species Sepal.Length Sepal.Width ## Length:300 Length:300 Min. :4.417 Min. :1.796 ## Class :character Class :character 1st Qu.:5.209 1st Qu.:2.720 ## Mode :character Mode :character Median :5.844 Median :2.992 ## Mean :5.857 Mean :3.064 ## 3rd Qu.:6.448 3rd Qu.:3.375 ## Max. :8.478 Max. :4.810 ## Petal.Length Petal.Width ## Min. :1.135 Min. :-0.03371 ## 1st Qu.:1.566 1st Qu.: 0.30278 ## Median :4.228 Median : 1.28776 ## Mean :3.738 Mean : 1.19830 ## 3rd Qu.:5.205 3rd Qu.: 1.87452 ## Max. :6.955 Max. : 2.62487 abstract $ Species[abstract $ Species == "versicolor" ] <- 1 abstract $ Species[abstract $ Species == "setosa" ] <- 2 abstract $ Species[abstract $ Species == "virginica" ] <- 3 step1 = lm (Species ~ Sepal.Length, data = abstract) step2 = lm (Species ~ Sepal.Length + Sepal.Width, data = abstract) step3 = lm (Species ~ Sepal.Length + Sepal.Width + Petal.Length, data = abstract) step4 = lm (Species ~ Sepal.Length + Sepal.Width + Petal.Length + Petal.Width, data = abstract) summary (step1) ## ## Call: ## lm(formula = Species ~ Sepal.Length, data = abstract) ## ## Residuals:
## Min 1Q Median 3Q Max ## -1.3622 -0.9185 0.2177 0.6986 1.1889 ## ## Coefficients: ## Estimate Std. Error t value Pr(>|t|) ## (Intercept) 0.32501 0.35068 0.927 0.355 ## Sepal.Length 0.28598 0.05936 4.817 2.32e-06 *** ## --- ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 ## ## Residual standard error: 0.7891 on 298 degrees of freedom

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture