% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/es_from_PAIRED_MEANS.R
\name{es_from_means_sd_pre_post}
\alias{es_from_means_sd_pre_post}
\title{Convert pre-post means of two independent groups into various effect size measures}
\usage{
es_from_means_sd_pre_post(
  mean_pre_exp,
  mean_exp,
  mean_pre_sd_exp,
  mean_sd_exp,
  mean_pre_nexp,
  mean_nexp,
  mean_pre_sd_nexp,
  mean_sd_nexp,
  n_exp,
  n_nexp,
  r_pre_post_exp,
  r_pre_post_nexp,
  smd_to_cor = "viechtbauer",
  pre_post_to_smd = "bonett",
  pool_sd = FALSE,
  reverse_means_pre_post
)
}
\arguments{
\item{mean_pre_exp}{mean of the experimental/exposed group at baseline}

\item{mean_exp}{mean of the experimental/exposed group at follow up}

\item{mean_pre_sd_exp}{standard deviation of the experimental/exposed group at baseline}

\item{mean_sd_exp}{standard deviation of the experimental/exposed group at follow up}

\item{mean_pre_nexp}{mean of the non-experimental/non-exposed group at baseline}

\item{mean_nexp}{mean of the non-experimental/non-exposed group at follow up}

\item{mean_pre_sd_nexp}{standard deviation of the non-experimental/non-exposed group at baseline}

\item{mean_sd_nexp}{standard deviation of the non-experimental/non-exposed group at follow up}

\item{n_exp}{number of the experimental/exposed group}

\item{n_nexp}{number of the non-experimental/non-exposed group}

\item{r_pre_post_exp}{pre-post correlation in the experimental/exposed group}

\item{r_pre_post_nexp}{pre-post correlation in the non-experimental/non-exposed group}

\item{smd_to_cor}{formula used to convert the \code{cohen_d} value into a coefficient correlation (see details).}

\item{pre_post_to_smd}{formula used to convert the pre and post means/SD into a SMD (see details).}

\item{pool_sd}{a logical value indicating whether the standardizing SD should be pooled across the two
groups (default \code{FALSE}). The two options target the same estimand when the arms' true SDs are
equal (as randomization implies at baseline) and differ otherwise; the literature does not agree on
which to prefer, so this is a deliberate choice and not a technical detail.
\itemize{
\item \code{FALSE} (default): each arm's change is standardized by that arm's OWN SD and the two
within-group values are subtracted, their variances adding because the arms are independent. This
is Morris's (2008) \eqn{d_{ppc1}}, from Becker (1988). It makes no assumption that the arms' true
SDs are equal, and Viechtbauer (see the metafor-project Morris 2008 page) describes it as the more
broadly applicable of the two.
\item \code{TRUE}: the difference in mean change is divided by a single SD pooled across arms. This
is Morris's (2008) \eqn{d_{ppc2}} (his eq. 8-9), which he recommends: it is more efficient, but it
assumes the two arms' true standardizing SDs are equal.
}}

\item{reverse_means_pre_post}{a logical value indicating whether the direction of generated effect sizes should be flipped.}
}
\value{
This function estimates and converts between several effect size measures.

\tabular{ll}{
\code{natural effect size measure} \tab MD + D + G\cr
\tab \cr
\code{converted effect size measure} \tab OR + R + Z \cr
\tab \cr
\code{required input data} \tab See 'Section 15. Paired: pre-post means and dispersion'\cr
\tab https://metaconvert.org/input.html\cr
\tab \cr
}
}
\description{
Convert pre-post means of two independent groups into various effect size measures
}
\details{
This function converts pre-post means of two independent groups into a Cohen's d (D) and Hedges' g (G).
Odds ratio (OR) and correlation coefficients (R/Z) are then converted from the Cohen's d.

\strong{Four approaches can be used to compute the Cohen's d.}

In these approaches, the standard deviation of the difference within each group first needs to be obtained:
\deqn{adj\_exp = 2*r\_pre\_post\_exp*mean\_pre\_sd\_exp*mean\_sd\_exp}
\deqn{sd\_change\_exp = \sqrt{mean\_pre\_sd\_exp^2 + mean\_sd\_exp^2 - adj\_exp}}
\deqn{adj\_nexp = 2*r\_pre\_post\_nexp*mean\_pre\_sd\_nexp*mean\_sd\_nexp}
\deqn{sd\_change\_nexp = \sqrt{mean\_pre\_sd\_nexp^2 + mean\_sd\_nexp^2 - adj\_nexp}}
\enumerate{
\item In the approach described by Bonett (\code{pre_post_to_smd = "bonett"}), one Cohen's d per group is obtained by
standardizing the pre-post mean difference by the standard deviation at baseline (Bonett, 2008):
\deqn{cohen\_d\_exp = \frac{mean\_exp - mean\_pre\_exp}{mean\_pre\_sd\_exp}}
\deqn{cohen\_d\_nexp = \frac{mean\_nexp - mean\_pre\_nexp}{mean\_pre\_sd\_nexp}}
\item In the approach described by Cooper (\code{pre_post_to_smd = "cooper"} or \code{"morris_drm"}), the following
formulas are used (Cooper et al., 2019; Morris & DeShon, 2002):
\deqn{cohen\_d\_exp = \frac{mean\_exp - mean\_pre\_exp}{sd\_change\_exp} * \sqrt{2 * (1 - r\_pre\_post\_exp)}}
\deqn{cohen\_d\_nexp = \frac{mean\_nexp - mean\_pre\_nexp}{sd\_change\_nexp} * \sqrt{2 * (1 - r\_pre\_post\_nexp)}}
\item In the approach described by Morris & DeShon (\code{pre_post_to_smd = "morris_dz"}), the pre-post mean difference
is standardized by the standard deviation of the change (Morris & DeShon, 2002):
\deqn{cohen\_d\_exp = \frac{mean\_exp - mean\_pre\_exp}{sd\_change\_exp}}
\deqn{cohen\_d\_nexp = \frac{mean\_nexp - mean\_pre\_nexp}{sd\_change\_nexp}}
\item In the approach described by Morris (\code{pre_post_to_smd = "morris_dav"}), the pre-post mean
difference is standardized by the average of the baseline and follow up SDs (Morris, 2008). Note that
Morris (2008, p.384) recommended \emph{against} this standardizer because its sampling variance was
unknown to him; the variance used here is the heteroscedasticity-robust form of Bonett (2008, eq. 10/19):
\deqn{cohen\_d\_exp = \frac{mean\_exp - mean\_pre\_exp}{\sqrt{(mean\_pre\_sd\_exp^2 + mean\_sd\_exp^2)/2}}}
\deqn{cohen\_d\_nexp = \frac{mean\_nexp - mean\_pre\_nexp}{\sqrt{(mean\_pre\_sd\_nexp^2 + mean\_sd\_nexp^2)/2}}}
}

Last, the Cohen's d reflecting the within-group change from baseline to follow-up are combined into one Cohen's d:
\deqn{cohen\_d = d\_exp - d\_nexp}
\deqn{cohen\_d\_se = \sqrt{cohen\_d\_se\_exp^2 + cohen\_d\_se\_nexp^2}}

\strong{To estimate other effect size measures},
calculations of the \code{\link{es_from_cohen_d}()} are applied.
}
\examples{
es_from_means_sd_pre_post(
  n_exp = 36, n_nexp = 35,
  mean_pre_exp = 98, mean_exp = 102,
  mean_pre_sd_exp = 16, mean_sd_exp = 17,
  mean_pre_nexp = 96, mean_nexp = 102,
  mean_pre_sd_nexp = 14, mean_sd_nexp = 15,
  r_pre_post_exp = 0.8, r_pre_post_nexp = 0.8
)
}
\references{
Bonett, D. G. (2008). Confidence intervals for standardized linear contrasts of means. Psychological Methods, 13(2), 99-109.

Morris, S. B. (2008). Estimating effect sizes from pretest-posttest-control group designs. Organizational Research Methods, 11(2), 364-386. https://doi.org/10.1177/1094428106291059

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Morris, S. B., & DeShon, R. P. (2002). Combining effect size estimates in meta-analysis with repeated measures and independent-groups designs. Psychological Methods, 7(1), 105-125. https://doi.org/10.1037/1082-989X.7.1.105
}
