somersD: Calculates Somer's D

Description Usage Arguments Value Examples

View source: R/somersD.r

Description

This function calculates the Somer's D measure of association statistic. This function makes use of the svytable function from the survey package.

Usage

1

Arguments

formula

A formula in the form ~ indepvar + depvar

data

A design dataset (e.g. gssD, nesD, statesD, or worldD)

Value

Return Somer's D measure of association statistic, a number between 0 and 1.

Examples

1
2
3
   library(poliscidata)
   
   somersD(~ dem_educ3 + envjob_3, nesD)

Example output

     Somers'dyx:
[1] -0.02905914

poliscidata documentation built on July 8, 2020, 6:23 p.m.