#install.packages("readxl")
library(readxl)
mydata <- read_xlsx("./Medicine.xlsx")
Calculate the average number of headaces for three groups of therapies.
library(psych)
describeBy(mydata$Headache, group = mydata$Medicine)
##
## Descriptive statistics by group
## group: A
## vars n mean sd median trimmed mad min max range skew
## X1 1 10 41.5 10.56 39.5 41 11.86 28 59 31 0.3
## kurtosis se
## X1 -1.45 3.34
## ----------------------------------------------------
## group: B
## vars n mean sd median trimmed mad min max range skew
## X1 1 10 37 10.37 40.5 37.75 5.93 18 50 32 -0.66
## kurtosis se
## X1 -1.1 3.28
## ----------------------------------------------------
## group: C
## vars n mean sd median trimmed mad min max range skew kurtosis
## X1 1 10 26.8 8.84 24 26.75 11.12 15 39 24 0.14 -1.84
## se
## X1 2.8