signif_overall: Significance overall

signif_overallR Documentation

Significance overall

Description

Function to calculate overall results for a root dataframe, and compare significance of group-differences for a grouped dataframe.

Usage

signif_overall(
  processed_df,
  root_df,
  group_cols,
  est_col,
  moe_col,
  bind_overall = NULL
)

Arguments

processed_df

Processed dataframe where each row represents a group to compare against the overall.

root_df

Lightly-processed ACS dataframe with estimate and moe column. Estimates should be components of a whole (i.e., not median income, but something like population). E.g., if the root_df describes computer access by sex and age, and the processed_df describes computer access by age group.

group_cols

The set of columns to calculate overall results for. E.g., if you want to see how age groups differ from overall rates of access, you would enter the computer access column as the group col.

est_col

The name of the value column in the processed dataset.

moe_col

The name of the moe column in the processed dataset.

bind_overall

Whether to add overall results as a row to the processed dataframe. Should enter name of column with groups comparing against (e.g., if comparing ages against overall, should enter age).

Value

The processed dataframe with additional columns for the overall estimate and MOE, the critical value of groups differences from the overall difference, and the overall statistical significance of results. If bind_overall is not null, also has an additional row for overall results.


dpowerstp/acsprocess documentation built on Sept. 4, 2022, 10:18 a.m.