powered by
This function calculates the Somer's D measure of association statistic. This function makes use of the svytable function from the survey package.
somersD(formula, data)
A formula in the form ~ indepvar + depvar
A design dataset (e.g. gssD, nesD, statesD, or worldD)
Return Somer's D measure of association statistic, a number between 0 and 1.
# NOT RUN { library(poliscidata) somersD(~ dem_educ3 + envjob_3, nesD) # }
Run the code above in your browser using DataLab