Median and quantile tests under complex survey design using SAS and R

Comput Methods Programs Biomed. 2014 Nov;117(2):292-7. doi: 10.1016/j.cmpb.2014.07.007. Epub 2014 Jul 28.

Abstract

Techniques for conducting hypothesis testing on the median and other quantiles of two or more subgroups under complex survey design are limited. In this paper, we introduce programs in both SAS and R to perform such a test. A detailed illustration of the computations, macro variable definitions, input and output for the SAS and R programs are also included in the text. Urinary iodine data from National Health and Nutrition Examination Survey (NHANES) are used as examples for comparing medians between females and males as well as comparing the 75th percentiles among three salt consumption groups.

Keywords: Complex survey; Median; Quantile; R; SAS.

MeSH terms

  • Algorithms*
  • Computer Simulation
  • Data Interpretation, Statistical*
  • Female
  • Humans
  • Male
  • Models, Statistical*
  • Nutrition Surveys / methods*
  • Programming Languages*
  • Software*