FIND DATA: By Journal | Sites   ANALYZE DATA: Help with R | SPSS | Stata | Excel   WHAT'S NEW? US Politics | IR | Law & Courts🎵
   FIND DATA: By Journal | Sites   WHAT'S NEW? US Politics | IR | Law & Courts🎵
WHAT'S NEW? US Politics | IR | Law & Courts🎵

Run R Code Example Online

# Descriptive Statistics for Ordinal-Level Variable
#############################################################
library("poliscidata")
#############################################################

# The values of ordinal-level variables can be compared; there is an order to them.
# The immigpo_level variable in the NES dataset is an example of a ordinal-level variable.
# There are more tools for description than we have for nominal-level variables.

cat("Frequency Distribution Table:\n")
freqC(nes$immigpo_level, nes$wt)

cat("\nMode:\n")
wtd.mode(nes$immigpo_level, nes$wt)

cat("\nMedian:\n")
wtd.median(nes$immigpo_level, nes$wt)