Advertisement
Guest User

Untitled

a guest
Aug 17th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. df<-read.csv(header=T, text="
  2. ID, Group, Hemi, total, wealth
  3. 100, 0, 0, 39, 1.99
  4. 100, 0, 1, 44, 1.99
  5. 101, 0, 0, 38, 2.01
  6. 101, 0, 1, 23, 2.01
  7. 102, 0, 0, 22, 22.1
  8. 102, 0, 1, 23, 22.1
  9. 200, 1, 0, 33, 80.1
  10. 200, 1, 1, 23, 80.1
  11. 202, 1, 0, 18, 12.1
  12. 202, 1, 1, 28, 12.1")
  13. #hemi=0 for left, hemi=1 for right
  14. df$hemi<-as.factor(df$hemi)
  15. df$group<-as.factor(df$group)
  16. df$ID<-as.factor(df$ID)
  17.  
  18. #Fitting the ANCOVA
  19. ezANOVA(data = df, between_covariates = wealth,
  20. dv=total, wid=ID, within=hemi, between=Group)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement