analyzeRq1: analyzeRq1

Description Usage Arguments Details Value Create Data Create Tables Conduct Tests Odds Ratios Create Plots Author(s)


analyzeRq1(brfss)Performs analysis of research question 1: Is there an association between education and income and the prevalence of depression?





Data frame of preprocessed 2013 Behavioral Risk Factor Surveillance System (BRFSS) telephone survey.


Function that performs the analysis for research question #1: Is there an association between education and income and the prevalence of depression? The function contains __ primary sections: (!) create Data, (2), create tables, (3), conduct tests, (4) compute oods ratios, and (5) render plots.


A nested list containing marginal, conditional, and joint association frequencies and proportions, plots, statistical tests and odds ratios. The return variables are as follows:

Create Data

This section filters the preprocessed BRFSS data to include valid values of income, education and a depression diagnosis. An incoime/education interaction variable is created. Finally depression diagnosis data is rendered by income, education and the income/education interaction variable. The variables are as follows:

Create Tables

This section converts the income, education and depression diagnosis data to frequency, proportion, interaction, joint frequency, joint proportion, conditional frequency and conditional proportion tables, The variables are:

Conduct Tests

This section performs the statistical tests that reveal the associations between depression and income and education. First, chi-squaared tests are conducted to ascertain marginal and joint independence of income and education and depression diagnoses. Cramer's V tests quantified the strength of any association. The Cochran-Mantel-Haenszel test was administered to measure three-way independence between depression diagnoses and income and education. The variables are as follows:

Odds Ratios

This section computes the odds ratios for marginal, conditional and joint associations. The variables are as follows:

Create Plots

This section renders the plots for this analysis. Stacked bar plots showing marginal frequency and proportions are rendered for both income and education. Conditional proportion plots are rendered for education and income interaction, holding education constant. The variables are:


John James,

DataScienceSalon/chronic documentation built on May 8, 2019, 11:47 a.m.