View source: R/estimate_rdiff_two.R
estimate_rdiff_two | R Documentation |
Returns effect sizes appropriate for estimating the linear relationship between two quantitative variables
estimate_rdiff_two(
data = NULL,
x = NULL,
y = NULL,
grouping_variable = NULL,
comparison_r = NULL,
comparison_n = NULL,
reference_r = NULL,
reference_n = NULL,
grouping_variable_levels = NULL,
x_variable_name = "My x variable",
y_variable_name = "My y variable",
grouping_variable_name = "My grouping variable",
conf_level = 0.95,
save_raw_data = TRUE
)
data |
For raw data - a dataframe or tibble |
x |
For raw data - The column name of the outcome variable, or a vector of numeric data |
y |
For raw data - The column name of the outcome variable, or a vector of numeric data |
grouping_variable |
For raw data, a vector that is a factor or the name of a factor column from data |
comparison_r |
For summary data, a pearson's r correlation coefficient |
comparison_n |
For summary data - An integer > 0 |
reference_r |
For summary data, a pearson's r correlation coefficient |
reference_n |
For summary data - An integer > 0 |
grouping_variable_levels |
For summary data - An optional vector of 2 group labels |
x_variable_name |
Optional friendly name for the x variable. Defaults to 'My x variable' or the outcome variable column name if a data frame is passed. |
y_variable_name |
Optional friendly name for the y variable. Defaults to 'My y variable' or the outcome variable column name if a data frame is passed. |
grouping_variable_name |
Optional friendly name for the grouping variable. Defaults to 'My grouping variable' or the grouping 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 |
Returnsobject of class esci_estimate
# 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_correlation(
datasets::anscombe,
x1,
y1
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.