im searching a r package that enables me to compute Goodman and Kruskal's gamma correlations within each subject. I have 2 variables with 16 items each, which I would like to correlate per subject.
So far I used the Hmisc package and the rcorr.cens() function. However, the function creates an correlation overall subject and I failed to adapt the code to get a correlation for each subject... Thats how I tried so far....
```Gamma_correlation <- dataframe %>%
group_by(Subject) %>%
rcorr.cens(dataframe$Variable_1,
dataframe$Variable_2,
outx = TRUE)[2]```