Replace with Main Title
Samuel Kaiser
2026-02-20
## Loading required package: splines
## Loading required package: RcmdrMisc
## Loading required package: car
## Loading required package: carData
## Loading required package: sandwich
## Loading required package: effects
## lattice theme set by effectsTheme()
## See ?effectsTheme for details.
## The Commander GUI is launched only in interactive sessions
##
## Attaching package: 'Rcmdr'
## The following object is masked from 'package:base':
##
## errorCondition
> Waterquality <- readXL("D:/KNUST/MPhil/Math and Statistics/water_quality.xlsx", rownames=FALSE, header=TRUE, na="",
+ sheet="dataset", stringsAsFactors=TRUE)
> library(abind, pos=16)
> library(e1071, pos=17)
Numerical Summaries: Waterquality
> numSummary(Waterquality[,"Result", drop=FALSE], statistics=c("mean", "sd", "IQR", "quantiles", "cv", "skewness",
+ "kurtosis"), quantiles=c(0,.25,.5,.75,1), type="2")
Warning in cv(X): not all values are positive
mean sd IQR cv skewness kurtosis 0% 25% 50% 75% 100% n
0.2707836 0.6684707 0.2 2.468653 6.806795 62.47219 0 0 0.1 0.2 8.8 2422
Numerical Summaries: Waterquality
> numSummary(Waterquality[,"Result", drop=FALSE], groups=Waterquality$Suburb, statistics=c("mean", "sd", "IQR",
+ "quantiles", "cv", "skewness", "kurtosis"), quantiles=c(0,.25,.5,.75,1), type="2")
Warning in FUN(X[[i]], ...): CV is deprecated in RcmdrMisc package. Use cv
instead.
Warning in cv(x = x, na.rm = na.rm): not all values are positive
Warning in FUN(X[[i]], ...): CV is deprecated in RcmdrMisc package. Use cv
instead.
Warning in cv(x = x, na.rm = na.rm): not all values are positive
Warning in FUN(X[[i]], ...): CV is deprecated in RcmdrMisc package. Use cv
instead.
Warning in cv(x = x, na.rm = na.rm): not all values are positive
Warning in FUN(X[[i]], ...): CV is deprecated in RcmdrMisc package. Use cv
instead.
Warning in cv(x = x, na.rm = na.rm): not all values are positive
Warning in FUN(X[[i]], ...): CV is deprecated in RcmdrMisc package. Use cv
instead.
Warning in cv(x = x, na.rm = na.rm): not all values are positive
Warning in FUN(X[[i]], ...): CV is deprecated in RcmdrMisc package. Use cv
instead.
Warning in cv(x = x, na.rm = na.rm): not all values are positive
Warning in FUN(X[[i]], ...): CV is deprecated in RcmdrMisc package. Use cv
instead.
Warning in cv(x = x, na.rm = na.rm): not all values are positive
mean sd IQR cv skewness kurtosis 0% 25% 50%
Blancathey 0.5063170 1.1641068 0.5425 2.299166 4.512782 22.8617883 0 0 0.10
Hallburgh 0.1711608 0.3124392 0.2000 1.825414 3.856363 22.7375533 0 0 0.06
Merton 0.1625438 0.2909154 0.2000 1.789766 3.350119 12.9699630 0 0 0.06
Southwold 0.1550895 0.2329508 0.2000 1.502042 2.331046 5.5812579 0 0 0.07
Swadlincote 0.1611268 0.1965144 0.2000 1.219625 1.562331 2.0282953 0 0 0.10
Tarnstead 0.3475811 1.0499743 0.2000 3.020804 5.012955 28.2948705 0 0 0.07
Wakefield 0.3796176 0.5591376 0.5500 1.472897 1.446995 0.6723909 0 0 0.10
75% 100% Result:n
Blancathey 0.5425 8.01 336
Hallburgh 0.2000 3.00 339
Merton 0.2000 2.00 343
Southwold 0.2000 1.25 339
Swadlincote 0.2000 0.91 339
Tarnstead 0.2000 8.80 339
Wakefield 0.5500 2.04 387
Histogram: Result
> with(Waterquality, Hist(Result, scale="frequency", breaks="Sturges", col="darkgray"))

Histogram: Result
> with(Waterquality, Hist(Result, groups=Suburb, scale="frequency", breaks="Sturges", col="darkgray"))

Boxplot: ~ Result
> Boxplot( ~ Result, data=Waterquality, id=list(method="y"))

[1] "1299" "541" "697" "1410" "860" "324" "907" "672" "2123" "1632"
Boxplot: Result ~ Suburb
> Boxplot(Result ~ Suburb, data=Waterquality, id=list(method="y"))

[1] "697" "1410" "860" "324" "907" "2123" "1225" "1710" "768" "995"
[11] "202" "1862" "262" "1899" "313" "293" "365" "421" "338" "375"
[21] "199" "2294" "2385" "1920" "2045" "1807" "1951" "2003" "1835" "2066"
[31] "268" "297" "305" "2398" "550" "459" "2243" "506" "2316" "570"
[41] "1014" "2388" "2210" "229" "2229" "274" "2259" "2306" "246" "1148"
[51] "1299" "541" "672" "1632" "43" "266" "2155" "800" "1218" "206"
[61] "195" "320" "803" "1964" "723" "2042" "617" "446" "529" "1864"