I would like to obtain the significance value for a correlation computed on complex survey data in R! As far as I know, correlations are calculated as follows with the survey package:
var <- svyvar(~var1+var2, design, na.rm=TRUE)
cov2cor(as.matrix(var))
This only provides the correlation coefficients, though. Hence my question: How can I get the significance value for such a correlation? I know that this might be done by passing the sig.stats = TRUE
argument to the svycor
function in the jtools package:
svycor(~var1+var2,
design,
na.rm = TRUE,
sig.stats = TRUE,
bootn = 1000)
This, however, relies on the wtd.cor
function in the weights package - which I somehow have troubles installing, due to some issue with the gdata dependency. Does anyone have a workaround for this? Thanks a lot in advance!