# Study inhomogeneity at differents levels

#### Ranfly

##### New Member
It's about a social psychology study. People assigned to 2 portions [ R (Right) L (Left)] in 3 spaces (88,29,25) that each one have 3 configurations (1,2,3) R and L are quantitites of person that follows the instructions while n_R and n_L are quantities of persons in each sample that do not follows the instructions and place themselves in the wrong areas.

my data in mat:

Code:
mat=structure(list(Sample = c(4L, 13L, 28L, 37L, 40L, 1L, 10L, 22L,
31L, 7L, 16L, 19L, 25L, 34L, 5L, 14L, 29L, 38L, 41L, 2L, 11L,
23L, 32L, 8L, 17L, 20L, 26L, 35L, 6L, 15L, 30L, 39L, 42L, 3L,
12L, 24L, 33L, 9L, 18L, 21L, 27L, 36L), Space = c("88", "88",
"88", "88", "88", "25", "25", "25", "25", "29", "29", "29", "29",
"29", "88", "88", "88", "88", "88", "25", "25", "25", "25", "29",
"29", "29", "29", "29", "88", "88", "88", "88", "88", "25", "25",
"25", "25", "29", "29", "29", "29", "29"), Configuration = c(1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
BR = c(5, 4, 7, 4, 7, 7, 4, 3, 12, 7, 11, 6, 1, 2, 0, 2,
3, 3, 3, 0, 1, 1, 1, 0, 0, 2, 6, 1, 1, 0, 5, 5, 5, 2, 5,
2, 0, 2, 5, 2, 0, 3), BL = c(4, 0, 2, 3, 10, 7, 0, 0, 6,
7, 6, 1, 1, 0, 9, 0, 3, 10, 8, 2, 1, 7, 4, 0, 8, 0, 3, 2,
8, 3, 7, 7, 6, 7, 4, 0, 10, 7, 8, 11, 4, 4), TR = c(2, 1,
2, 4, 4, 0, 2, 6, 1, 0, 0, 1, 4, 0, 0, 5, 0, 2, 1, 0, 0,
1, 4, 0, 0, 0, 1, 1, 1, 5, 2, 3, 4, 2, 0, 5, 2, 4, 1, 1,
6, 3), TL = c(0, 1, 0, 1, 1, 2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1),
n_L = c(7, 3, 2, 4, 1, 3, 2, 7, 1, 2, 3, 4, 1, 0, 0, 0, 1,
0, 3, 1, 4, 0, 0, 8, 1, 1, 0, 0, 0, 4, 0, 0, 3, 3, 0, 0,
0, 3, 2, 1, 0, 0)), .Names = c("Sample", "Space", "Configuration",
"BR", "BL", "TR", "TL", "n_BR", "n_BL", "n_TR", "n_TL", "R",
"L", "n_R", "n_L"), row.names = c(NA, -42L), class = "data.frame")
I want to study few aspects and I'm stack each time with what type of analyses to use in R :

Is there really more "conformism" behaviour across all the samples : should I use Chi-square between R, L , n_L, n_R ?
Is there special effect of "conformism" between Right (R) and Left (Left) for each configuration (1,2,3) for all the spaces ? I think about Anova but i'm not sure that it is the best way/ syntax :
Code:
int <- aov(matConfiguration ~matConfiguration matR + mat\$L)
Is there special effect of "conformisme" between Right (R) and Left (Left) for each configuration (1,2,3) for each spaces ? I have no idea which type of test to use.