estimate_pdiff_paired: Estimate magnitude of difference between two related...

View source: R/estimate_pdiff_paired.R

estimate_pdiff_pairedR Documentation

Estimate magnitude of difference between two related measures.

Description

\loadmathjax

estimate_pdiff_paired returns effect sizes for comparing two related nominal measures.

Usage

estimate_pdiff_paired(
  data = NULL,
  comparison_measure = NULL,
  reference_measure = NULL,
  cases_consistent = NULL,
  cases_inconsistent = NULL,
  not_cases_consistent = NULL,
  not_cases_inconsistent = NULL,
  case_label = 1,
  not_case_label = NULL,
  comparison_measure_name = "Comparison measure",
  reference_measure_name = "Reference measure",
  conf_level = 0.95,
  count_NA = FALSE
)

Arguments

data

For raw data - a dataframe or tibble

comparison_measure

For raw data - The comparison measure, a factor. Can be the column name of a data frame of a vector.

reference_measure

For raw data - The reference measure, a factor. Can be the column name of a data frame of a vector.

cases_consistent

Count of cases in measure 1 that are also cases at measure 2; measure 1 = 0, measure 2 = 0; cell 0_0

cases_inconsistent

Count of cases in measure 1 that are not cases at measure 2; measure 1 = 0, measure 2 = 1; cell 0_1

not_cases_consistent

Count of not cases in measure 1 that are also not cases at measure 2; measure 1 = 1, measure 2 = 1, cell 1_1

not_cases_inconsistent

Count of not cases in measure 1 that are not cases at measure 2; measure 1 = 1, measure 2 = 0, cell 1_0

case_label

An optional numeric or character label for the case level.

not_case_label

An optional numeric or character label for the not case level.

comparison_measure_name

For summary data - An optional character label for the comparison measure. Defaults to 'Comparison measure'

reference_measure_name

For summary data - An optional character label for the reference measure. Defaults to 'Reference measure'

conf_level

The confidence level for the confidence interval. Given in decimal form. Defaults to 0.95.

count_NA

Logical to count NAs (TRUE) in total N or not (FALSE)

Value

Returns object of class esci_estimate

Examples

# From Raw Data ------------------------------------
# Just pass in the data source, grouping column, and outcome column.
# You can pass these in by position, skipping the labels:

# Note... not sure if PlantGrowth dataset meets assumptions for this analysis
estimate_mdiff_paired(
 iris,
 Sepal.Length,
 Petal.Length
)


rcalinjageman/esci4 documentation built on May 18, 2023, 4:01 a.m.