0

I'm fairly new to R and am having a few issues with my research. I need to compare ranked data but am a little stuck.

So, i asked a group of volunteers to rank 10 images on a scale of 1-10 (corresponding to light to dark), I then ran a computer program on the same images to generate a 1-10 rank for light to dark. I want to compare whether the computer generated rank is significantly different from the participant rank.

The problem I've got is I need to compare: participant rank vs computer rank vs black area rank vs white area rank for each image, and R says this is not a matrix so I am not very lost as to how to rectify this problem.

I would greatly appreciate any guidance and advice you can give me :)

Here is some data:

Mean_Rank_A
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
Black_Rank_A
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9

White_Rank_A
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3

Observered_A
3
4
4
3
5
3
3
3
5
4
3
4
3
3
3
4
3
3
3
3
4
3
6
8
3
3
5
3
3
3

The code i tried was: kruskal.test(Mean_Rank_A~Black_Rank_A~White_Rank_A~Observered_A, data = Ranking_Data)

I am sure whatever I am doing wrong is really simple, I just don't speak R very well

Thank you for all the help!

  • 1
    Please post the code you have so far and also some example data, but not too much. – Martin Zabel Mar 01 '16 at 12:31
  • I hope that is more helpful, sorry for not posting before –  Mar 01 '16 at 12:47
  • Please always format your code and the example data using monospace font. To format the code, mark it in the edit window and press `CTRL+K`. The same can be applied for the data, but you have to check if it must be seperate lines or not. – Martin Zabel Mar 01 '16 at 12:50
  • 1
    The tilde `"~"` is equivalent to the equals sign `"="`. There should only be one in the formula. The way you have it `Mean_Rank~White~Black~Observed` doesn't make much sense. Please read through `?kruskal.test` and check out the examples included. – Pierre L Mar 01 '16 at 12:54
  • ok so i had a look at the examples and so, if i'm correct in thinking my data is similar to the first example in the help page, my code should be written as `kruskal.test(Mean_Rank,White_Rank,Black_Rank,_Observed_Rank)` –  Mar 01 '16 at 13:45

0 Answers0