Task A Výsledok vyhľadávania obrázkov pre dopyt cannabis indica Anni Alžbeta Gianmaria > summary(thc) THC DW Min. : 3.00 Min. :1.200 1st Qu.: 6.60 1st Qu.:3.975 Median :10.10 Median :5.900 Mean : 9.92 Mean :5.830 3rd Qu.:11.75 3rd Qu.:8.325 Max. :20.80 Max. :9.100 •> lm.thc<-lm(THC~DW, data=thc) •> anova(lm.thc) • •Analysis of Variance Table • •Response: THC • Df Sum Sq Mean Sq F value Pr(>F) •DW 1 128.999 128.999 12.509 0.007655 ** •Residuals 8 82.497 10.312 •--- •Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 •> summary(lm.thc) • •Call: •lm(formula = THC ~ DW, data = thc) • •Residuals: • Min 1Q Median 3Q Max •-4.9687 -1.4006 -0.2593 1.4734 6.2498 • •Coefficients: • Estimate Std. Error t value Pr(>|t|) •(Intercept) 1.6650 2.5453 0.654 0.53138 •DW 1.4160 0.4003 3.537 0.00765 ** •--- •Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 • •Residual standard error: 3.211 on 8 degrees of freedom •Multiple R-squared: 0.6099, Adjusted R-squared: 0.5612 •F-statistic: 12.51 on 1 and 8 DF, p-value: 0.007655 • •formula: THC=1,6650+1,4160*DW windows() > plot(THC~DW, data=thc, col="blue") > pr<-predict(lm.thc, data.frame(DW= seq(1,10,0.1)), se.fit = T) > lines(seq(1,10,0.1), pr$fit) > lines(seq(1,10,0.1), pr$fit-(qt(0.975,8))*pr$se.fit,lty=2, col="red”) > lines(seq(1,10,0.1), pr$fit+(qt(0.975,8))*pr$se.fit,lty=2,col="red") Multiple R-squared: 0.6099 Adjusted R-squared: 0.5612 F(1,8)=12.51, p-value: 0.007655