Decriptive Section
data1<-read.csv("aids_data.csv")
mean(data1$age)
## [1] 3.503608
median(data1$age)
## [1] 3.610918
mean(data1$age,0.30)
## [1] 3.571432
library(EnvStats)
##
## Attaching package: 'EnvStats'
## The following objects are masked from 'package:stats':
##
## predict, predict.lm
## The following object is masked from 'package:base':
##
## print.default
library(moments)
##
## Attaching package: 'moments'
## The following objects are masked from 'package:EnvStats':
##
## kurtosis, skewness
library(psych)
library(AdequacyModel)
weighted.mean(data1$age)
## [1] 3.503608
harmonic.mean(data1$age)
## [1] 3.404061
geometric.mean(data1$age)
## [1] 3.457378
var(data1$age)
## [1] 0.2891845
sd(data1$age)
## [1] 0.5377588
skewness(data1$age)
## [1] -0.7327695
kurtosis(data1$age)
## [1] 3.342799
moment(data1$age,order = 3)
## [1] 45.91942
moment(data1$age,order = 5)
## [1] 642.345
cv(data1$age)
## [1] 0.1534872
geoSD(data1$age)
## [1] 1.184711
range(data1$age)
## [1] 1.386294 4.382027
moment(data1$age,order = 2)
## [1] 12.56305
summaryFull(data1$age)
## data1$age
## N 206.0000
## Mean 3.5040
## Median 3.6110
## 10% Trimmed Mean 3.5460
## Geometric Mean 3.4570
## Skew -0.7382
## Kurtosis 0.3810
## Min 1.3860
## Max 4.3820
## Range 2.9960
## 1st Quartile 3.2190
## 3rd Quartile 3.8920
## Standard Deviation 0.5378
## Geometric Standard Deviation 1.1850
## Interquartile Range 0.6730
## Median Absolute Deviation 0.5231
## Coefficient of Variation 0.1535
## attr(,"class")
## [1] "summaryStats"
## attr(,"stats.in.rows")
## [1] TRUE
## attr(,"drop0trailing")
## [1] TRUE
descriptive(data1$age)

## $mean
## [1] 3.50361
##
## $median
## [1] 3.61092
##
## $mode
## [1] 3.75
##
## $variance
## [1] 0.28918
##
## $Skewness
## [1] -0.73277
##
## $Kurtosis
## [1] 0.3428
##
## $minimum
## [1] 1.38629
##
## $maximum
## [1] 4.38203
##
## $n
## [1] 206
Data Visualization Section
library(vioplot)
## Loading required package: sm
## Package 'sm', version 2.2-5.7: type help(sm) for summary information
## Loading required package: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
hist(data1$age,col = "blueviolet", main = "Normal Disturbution Data",xlab = "Time in Years", ylab = "Cumalative Response")

vioplot(data1$age,col = "darkgoldenrod", main = "Normal Disturbution Data",xlab = "Time in Years", ylab = "Cumalative Response")

plot(density(data1$age), col = "darkcyan", main = "Normal Disturbution Data",xlab = "Time in Years", ylab = "Cumalative Response")
polygon(density(data1$age), col = "cornflowerblue", main = "Normal Disturbution Data",xlab = "Time in Years", ylab = "Cumalative Response")
polygon(density(data1$age),col="darkseagreen1", border="red")
