View source: R/analyze_selectivity.R
analyze_selectivity | R Documentation |
This function performs sensitivity analysis by computing the effect size Cohen's d per column to quantify sample selectivity of a reduced/cleaned (i.e., selective) analysis sample (e.g., after excluding observations) compared to its total base sample.
analyze_selectivity(.base_sample, .analysis_sample, .cols)
.base_sample |
A data frame. Should contain the data of the total base sample. |
.analysis_sample |
A data frame. Should contain the data of the reduced/cleaned analysis sample (e.g., after excluding observations). The number of observations in the analysis sample should be smaller than in the total base sample. |
.cols |
< |
Cohen's d is calculated with
( M(reduced) - M(total) ) / SD(total)
.
A tibble with 6 columns:
variable
The column the sensitivity anlysis was performed for
mean_tbs
Mean in the total base sample
sd_tbs
Standard deviation in the total base sample
mean_as
Mean in the reduced/cleaned analysis sample
sd_as
Standard deviation in the reduced/cleaned analysis sample
d
Cohen's d quantifying the sample selectivity
## Not run:
analyze_selectivity(.base_sample = studach,
.analysis_sample = studach_reduced, .cols = gender:read)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.