Summary Statistics
library(psych) #call psych
df = sleep #assign dataset to object df
psych::describe(df
) #run summary statistics using the describe(df) function
vars n mean sd median trimmed mad min max range skew kurtosis se
extra 1 20 1.54 2.02 0.95 1.47 1.56 -1.6 5.5 7.1 0.39 -1.09 0.45
group* 2 20 1.50 0.51 1.50 1.50 0.74 1.0 2.0 1.0 0.00 -2.10 0.11
ID* 3 20 5.50 2.95 5.50 5.50 3.71 1.0 10.0 9.0 0.00 -1.40 0.66
Data
Because the data tracks multiple student’s sleep data over 2 periods of time, the data is panel/longitudinal data.