Skip to content

Commit

Permalink
tweaks towards 1.0.3
Browse files Browse the repository at this point in the history
updated docs site, updated ci_smd_ind_contrast with math support, tweaks to work with statpsych 1.5 and 1.6
  • Loading branch information
rcalinjageman committed Jul 8, 2024
1 parent 4c3dba5 commit 518c996
Show file tree
Hide file tree
Showing 237 changed files with 15,540 additions and 6,709 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Imports:
Rdpack,
stringr,
mathjaxr
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Roxygen: list(markdown = TRUE)
RdMacros: Rdpack, mathjaxr
Suggests:
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.



Expand Down
14 changes: 7 additions & 7 deletions R/CI_smd_ind_contrast.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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 ####
Expand Down
6 changes: 4 additions & 2 deletions R/estimate_magnitude.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions R/estimate_mdiff_one.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion R/estimate_pdiff_one.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion R/estimate_proportion.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions R/overview.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# esci <img src="man/figures/esci_logo.svg" align="right" />
# esci <img src="man/figures/esci_logo.svg" align="right" alt = "esci logo"/>

esci provides student-friendly tools for estimation statistics:

Expand Down Expand Up @@ -90,4 +90,4 @@ plot_mdiff(estimate)

```

<img src="man/figures/plot_mdiff.png" align="right" />
<img src="man/figures/plot_mdiff.png" align="right" alt="Example difference plot"/>
1 change: 1 addition & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ url: https://rcalinjageman.github.io/esci

template:
bootstrap: 5
math-rendering: mathjax

development:
mode: auto
Expand Down
61 changes: 23 additions & 38 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 518c996

Please sign in to comment.