Advertisement
muridnyaindra

bab3 hal104

Nov 5th, 2019
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.53 KB | None | 0 0
  1. #################################
  2. ## Uji t dua sampel independen ##
  3. #################################
  4.  
  5. subset.InsectSpray = InsectSprays[InsectSprays$spray%in%c("A","C"),]
  6.  
  7. attach(subset.InsectSpray)
  8. #tes kenormalan
  9. #for variable count
  10. shapiro.test(count)
  11.  
  12. #test for equal variance
  13. var.test(count~spray)
  14.  
  15. subset.InsectSpray$spray=factor(subset.InsectSpray$spray, levels=c("A","C"))
  16. boxplot(count~spray,data=subset.InsectSpray,xlab="type of spray",ylab="insect count",main="inspectsprays data", varwidth=TRUE, col="lightgray")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement