estimate_mdiff_one: Estimate magnitudes of difference from a single measure...

View source: R/estimate_mdiff_one.R

estimate_mdiff_oneR Documentation

Estimate magnitudes of difference from a single measure compared to a known reference.

Description

Returns effect sizes appropriate for designs with one quantitative variable compared against a known reference.

Usage

estimate_mdiff_one(
  data = NULL,
  outcome_variable = NULL,
  comparison_mean = NULL,
  comparison_sd = NULL,
  comparison_n = NULL,
  reference_mean = 0,
  outcome_variable_name = "My outcome variable",
  conf_level = 0.95,
  save_raw_data = TRUE
)

Arguments

data

For raw data - a dataframe or tibble

outcome_variable

For raw data - The column name of the outcome variable, or a vector of numeric data

comparison_mean

For summary data, a numeric

comparison_sd

For summary data, numeric > 0

comparison_n

For summary data, a numeric integer > 0

reference_mean

Reference value, defaults to 0

outcome_variable_name

Optional friendly name for the outcome variable. Defaults to 'My outcome variable' or the outcome variable column name if a data frame is passed.

conf_level

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

save_raw_data

For raw data; defaults to TRUE; set to FALSE to save memory by not returning raw data in estimate object

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_one(
 datasets::PlantGrowth,
 weight,
 reference_mean = 2
)


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