somersD {poliscidata}R Documentation

Calculates Somer's D

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

somersD(formula, data)

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

   library(poliscidata)
   
   somersD(~ dem_educ3 + envjob_3, nesD)

[Package poliscidata version 2.3.0 Index]