signif_compare: Compare significance Identifies statistical significance of...

View source: R/signif_test.R

signif_compareR Documentation

Compare significance Identifies statistical significance of differences between a group in a dataframe and other groups.

Description

Compare significance Identifies statistical significance of differences between a group in a dataframe and other groups.

Usage

signif_compare(df, filter_col, filter_val, join_col, est_col, moe_col)

Arguments

df

A dataframe with estimate and margin of error columns for different groups.

filter_col

The column containing different groups, one of which you want to compare.

filter_val

A value that filters the filter column to one unique group. E.g., if the filter column is age-groups, the filter value should pull one age group.

join_col

Columns to join the filtered dataframe to the original dataframe by. Columns should result in one-to-one matches between filtered dataframe and original. E.g., if you want to compare differences for 20-30 year olds in a city against all other age groups in the same city, your join columns should be the city column.

est_col

The column containing the value you're comparing.

moe_col

The column containing the moe you're comparing.

Value

A dataframe containing four new columns for the estimate/moe of the compare-group, the critical value of the difference between the compare group and other groups, and the statistical-significance level of the difference.


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