1/10
Looks like no tags are added yet.
H
distribution of data deviates from normality
H0
distribution of data statistically indistinguishable from normality
Test whether data normally distributed
shapiro.test(dataframe[dataframe<em>anothercolumnname</em>==”<em>rowname</em>"]columnname)
Example: shapiro test for
shapiro.test(penguins[penguinsspecies==”Gentoo”,]body_mass)
Reject null hypothesis
p-value < 0.05
Fail to rejcet null hypothesis
p-value > 0.05
Non-parametric test
wilcox.test()
Example: Wilcox test for body mass of famle and female penguins
wilcox.test(penguins[penguinssex==”male”,]body_mass ,penguins[penguinssex==”female”,]body_mass)
Modelling relationships between columns of data
mymodel<- lm(dataframe<em>columnname</em> <em>dataframe</em>anothercolumnname)
Example of modelling: flipper length and body mass of penguins
mymodel<- lm(penguinsflipperlength penguinsbody_mass)
Adding a line into a plot with the estimated coefficients of the model
abline(mymodel)