Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201867

R - how to get data into block form for friedman test?

$
0
0

enter image description hereI have some data relating to levels of a chemical in the blood before and after treatment and there are 4 treatment groups - ABCD. I have been told I can run a Friedman test to compare all of these variables at once. The code I've tried is:

attach(LiverData.Wide)
friedman.test(ALPB ~ ALPM | Group)

I get this error:

Error in friedman.test.default(c(80L, 37L, 52L, 36L, 39L, 48L, 71L, 81L,  : 
not an unreplicated complete block design
  • ALPB is level of ALP before treatment.
  • ALPM is level of ALP after.
  • Group is the column heading for all the different groups.

so I need to work out how to get the data into block form so that I can run the test - any ideas how?

NB: I am a novice at R so sorry for a very basic question!

Also, I am only focusing on ALPB and ALPM - I am not interested in the other columns


Viewing all articles
Browse latest Browse all 201867

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>