Advertisement
Graf_Rav

R script for mat

May 21st, 2020
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. librarfor1(readxl)
  2. values <- read_excel("C:\\Users\\Admin\\Desktop\\stat\\data.xlsx")
  3. sortedValues <- values[order(values$value),]
  4. for0 <- values$value[values$mark == 0]
  5. for1 <- values$value[values$mark == 1]
  6.  
  7. nortest::pearson.test(for0)
  8. nortest::pearson.test(for1)
  9.  
  10. nortest::lillie.test(for0)
  11. nortest::lillie.test(for1)
  12.  
  13. mean(for0)
  14. mean(for1)
  15. t.test(for0, for1)
  16. var(for0)
  17. var(for1)
  18. var.test(for0, for1)
  19.  
  20. wilcox.test(for0, for1,efor0act = F, conf.int = T, Paired = F)
  21.  
  22. oneThird1 <- (max(values$value)-min(values$value))/3 + min(values$value)
  23. oneThird2 <- oneThird1+(max(values$value)-min(values$value))/3
  24. oneThird3 <- max(values$value)
  25. countFor01 <- length(for0[for0<oneThird1])
  26. countFor02 <- length (for0[for0<oneThird2 & for0>oneThird1])
  27. countFor03 <- length (for0[for0>oneThird2])
  28. countFor11 <- length(for1[for1<oneThird1])
  29. countFor12 <- length (for1[for1<oneThird2 & for1>oneThird1])
  30. countFor13 <- length (for1[for1>oneThird2])
  31. name<- c (0, 1)
  32. table <- rbind(c(countFor01, countFor11),c(countFor02, countFor12), c(countFor03, countFor13),names(name))
  33. chisq.test(table)
  34. table
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement