diff --git a/DESCRIPTION b/DESCRIPTION index ae8e5a0..34ab503 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -28,7 +28,7 @@ Imports: Rdpack, stringr, mathjaxr -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 Roxygen: list(markdown = TRUE) RdMacros: Rdpack, mathjaxr Suggests: diff --git a/NEWS.md b/NEWS.md index dd517e0..bb67c91 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,7 +3,7 @@ esci version 1.0.3 (Release data: July 2024) Changes: -* Tweaks to deal with changes in statpsych 1.6. No substantive updates. +* Tweaks to deal with changes in statpsych 1.6. No substantive updates. diff --git a/R/CI_smd_ind_contrast.R b/R/CI_smd_ind_contrast.R index 6520f05..cf5eac0 100644 --- a/R/CI_smd_ind_contrast.R +++ b/R/CI_smd_ind_contrast.R @@ -2,11 +2,11 @@ #' contrast #' #' -#' @description `CI_smd_ind_contrast` returns the point estimate +#' @description \loadmathjax `CI_smd_ind_contrast` returns the point estimate #' and confidence interval for a standardized mean difference (smd aka Cohen's #' *d* aka Hedges *g*). A standardized mean difference is a difference in means standardized #' to a standard deviation: -#' d = psi/s +#' \mjdeqn{d = \frac{ \psi }{s}}{d = psi/s} #' #' #' @param means A vector of 2 or more means @@ -88,16 +88,16 @@ #' When equal variance is assumed, the standardized mean difference is #' d_s, defined in Kline, p. 196: #' -#' d_s = psi / sd_s +#' \mjdeqn{ d_s = \frac{ \psi }{ sd_{pooled} } }{ d_s = psi / sd_s} #' #' #' where psi is defined in Kline, equation 7.8: #' -#' psi = sum(contrasts*means) +#' \mjdeqn{ \psi =\sum_{i=1}^{a}c_iM_i }{psi = sum(contrasts*means)} #' #' #' and where sd_pooled is defined in Kline, equation 3.11 -#' sqrt(sum(variances*dfs) / sum(dfs)) +#' \mjdeqn{sd_{pooled} = { \frac{ \sum_{i=1}^{a} (n_i -1) s_i^2 } { \sum_{i=1}^{a} (n_i-1) } }}{sqrt(sum(variances*dfs) / sum(dfs))} #' #' #' The CI for d_s is derived from lambda-prime transformation from Lecoutre, @@ -115,12 +115,12 @@ #' assumed, the standardized mean difference is d_avg, defined in Bonett, #' equation 6: #' -#' d_avg = psi / sd_avg +#' \mjdeqn{ d_{avg} = \frac{ \psi }{ sd_{avg} }}{ d_avg = psi / sd_avg} #' #' Where sd_avg is the square root of the average of the group variances, as #' given in Bonett, explanation of equation 6: #' -#' sqrt(mean(variances)) +#' \mjdeqn{sd_{avg} = \sqrt{ \frac{ \sum_{i=1}^{a} s_i^2 }{ a } }}{sqrt(mean(variances))} #' #' #' #### If only 2 groups #### diff --git a/R/estimate_magnitude.R b/R/estimate_magnitude.R index 5d829a9..d8daf4d 100644 --- a/R/estimate_magnitude.R +++ b/R/estimate_magnitude.R @@ -16,9 +16,11 @@ #' If you want to compare your sample to a known value or reference, then #' use [esci::estimate_mdiff_one()]. #' -#' The estimated mean is from [statpsych::ci.mean()]. +#' The estimated mean is from [statpsych::ci.mean1()] (renamed ci.mean as of +#' statpsych 1.6). #' -#' The estimated median is from [statpsych::ci.median()] +#' The estimated median is from [statpsych::ci.median1()] (renamed ci.median +#' as of statpsych 1.6) #' #' #' @param data For raw data - A data frame or tibble diff --git a/R/estimate_mdiff_one.R b/R/estimate_mdiff_one.R index 9375d63..96cc486 100644 --- a/R/estimate_mdiff_one.R +++ b/R/estimate_mdiff_one.R @@ -16,11 +16,13 @@ #' it with [esci::plot_mdiff()] and you can test hypotheses with #' [esci::test_mdiff()]. #' -#' The estimated mean differences are from [statpsych::ci.mean()]. +#' The estimated mean differences are from [statpsych::ci.mean1()] (renamed +#' ci.mean as of statpsych 1.6). #' #' The estimated SMDs are from [esci::CI_smd_one()]. #' -#' The estimated median differences are from [statpsych::ci.median()] +#' The estimated median differences are from [statpsych::ci.median1()] (renamed +#' ci.median as of statpsych 1.6) #' #' #' @param data For raw data - a data frame or tibble diff --git a/R/estimate_pdiff_one.R b/R/estimate_pdiff_one.R index 46be2a8..30b2026 100644 --- a/R/estimate_pdiff_one.R +++ b/R/estimate_pdiff_one.R @@ -15,7 +15,8 @@ #' it with [esci::plot_pdiff()] and you can test hypotheses with #' [esci::test_pdiff()]. #' -#' The estimated proportion differences are from [statpsych::ci.prop()]. +#' The estimated proportion differences are from [statpsych::ci.prop1()] (renamed +#' ci.prop as of statpsych 1.6). #' #' #' @param data For raw data - a dataframe or tibble diff --git a/R/estimate_proportion.R b/R/estimate_proportion.R index e1b8bb2..dab176a 100644 --- a/R/estimate_proportion.R +++ b/R/estimate_proportion.R @@ -14,7 +14,8 @@ #' If you want to compare your estimate to a known value or reference, then #' use [esci::estimate_pdiff_one()]. #' -#' The estimated proportions are from [statpsych::ci.prop()]. +#' The estimated proportions are from [statpsych::ci.prop1()] (renamed +#' ci.prop as of statpsych 1.6). #' #' #' @param data For raw data - a data frame or tibble diff --git a/R/overview.R b/R/overview.R index 0c89595..789d75e 100644 --- a/R/overview.R +++ b/R/overview.R @@ -10,8 +10,8 @@ #' #' @details #' If equal variance is not assumed, each group is treated independently. In -#' that case, the estimated mean, CI, and SE is from [statpsych::ci.mean()], -#' and the estimated median, CI, and SE is from [statpsych::ci.median()]. If +#' that case, the estimated mean, CI, and SE is from [statpsych::ci.mean1()], +#' and the estimated median, CI, and SE is from [statpsych::ci.median1()]. If #' equal variance is assumed, each group CI is calculated as with respect to all #' group data, using [statpsych::ci.lc.mean.bs()] and #' [statpsych::ci.lc.median.bs()] diff --git a/README.md b/README.md index 17b8d3f..dea126b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# esci +# esci esci logo esci provides student-friendly tools for estimation statistics: @@ -90,4 +90,4 @@ plot_mdiff(estimate) ``` - +Example difference plot diff --git a/_pkgdown.yml b/_pkgdown.yml index 8829b59..c78dbdd 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -2,6 +2,7 @@ url: https://rcalinjageman.github.io/esci template: bootstrap: 5 + math-rendering: mathjax development: mode: auto diff --git a/docs/404.html b/docs/404.html index 949ad5a..bf59d05 100644 --- a/docs/404.html +++ b/docs/404.html @@ -8,59 +8,46 @@ Page not found (404) • esci - - - - + + + Skip to contents - -