I have 2 groups (data.frame) in R called
bad which contains good users and bad users respectively.
game_id which is the id for a computergame and
number which is how many times this game has been played.
good$game_id we get
1 2 3 ... 20. We have 20 games.
good$number we get
45214 1254 23 ... 8914 which is the number the game has been played. For example has
game_id==1 been played 45214 times in group
We also have the same number of users in the two groups.
1 45214 2 1254 ... 20 8914
I want to investigate if there is dependence between the number of times a fixed computergame has been played.
game_id==1 I would try to use Pearson's Chi test for 'Independence'.
In R I type
chisq.test(good[1,2], bad[1,2]) to see if there is indepence between
game_id==1 but I get an error message:
x and y must have same levels.
How can this problem be solved ?