% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/es_from_stand_OR.R
\name{es_from_logreg_t}
\alias{es_from_logreg_t}
\title{Convert an odds ratio or risk ratio and a Wald t-statistic from a regression model into several effect size measures}
\usage{
es_from_logreg_t(
  or,
  logor,
  rr,
  logrr,
  logreg_t,
  baseline_risk,
  small_margin_prop,
  n_exp,
  n_nexp,
  n_cases,
  n_controls,
  n_sample,
  or_to_rr = "metaumbrella_cases",
  or_to_cor = "bonett",
  rr_to_or = "metaumbrella",
  reverse_logreg_t
)
}
\arguments{
\item{or}{odds ratio value (from logistic regression)}

\item{logor}{log odds ratio value}

\item{rr}{risk ratio value (from log-binomial or modified Poisson regression)}

\item{logrr}{log risk ratio value}

\item{logreg_t}{a t-statistic (Wald statistic) from a logistic, log-binomial, or modified Poisson regression model}

\item{baseline_risk}{proportion of cases in the non-exposed group}

\item{small_margin_prop}{smallest margin proportion of cases/events in the underlying 2x2 table}

\item{n_exp}{number of participants in the exposed group}

\item{n_nexp}{number of participants in the non-exposed group}

\item{n_cases}{number of cases/events across exposed/non-exposed groups}

\item{n_controls}{number of controls/no-event across exposed/non-exposed groups}

\item{n_sample}{total number of participants in the sample}

\item{or_to_rr}{formula used to convert the \code{or} value into a risk ratio (see details).}

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

\item{rr_to_or}{formula used to convert the \code{rr} value into an odds ratio (see details).}

\item{reverse_logreg_t}{a logical value indicating whether the direction of the 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 OR + RR \cr
\tab \cr
\code{converted effect size measure} \tab OR inputs: D + G + R + Z (+ RR + NNT + RD); RR inputs: OR + NNT + RD \cr
}
}
\description{
Convert an odds ratio or risk ratio and a Wald t-statistic from a regression model into several effect size measures
}
\details{
This function derives the standard error of the log odds ratio (or log risk ratio) from a
Wald t-statistic reported in a regression model.

\strong{To estimate the standard error of the log OR (or log RR)}, the formulas used are:
\deqn{t = \frac{\beta}{SE(\beta)}}
\deqn{SE(\beta) = \frac{|\beta|}{|t|}}
where \eqn{\beta} is \eqn{\log(OR)} or \eqn{\log(RR)} depending on the model.

Then, if an OR (or logOR) is entered, calculations of \code{\link{es_from_or_se}()} are applied.
If a RR (or logRR) is entered, calculations of \code{\link{es_from_rr_se}()} are applied.

Note that the standardized-mean-difference and correlation conversions (D, G, R, Z) are
produced for \strong{OR inputs only}. RR inputs are treated as a ratio measure and yield
RR + OR + NNT + RD: RR is not converted to a standardized mean difference or correlation,
because that would require going through the OR and the baseline risk (see
\code{\link{es_from_rr_se}}). To obtain a SMD or correlation from an RR, convert it to an
OR first (supplying the baseline risk) and then use the OR path.
}
\examples{
es_or <- es_from_logreg_t(
  or = 2.12, logreg_t = 3.21,
  n_cases = 50, n_controls = 150
)

es_rr <- es_from_logreg_t(
  rr = 1.5, logreg_t = 2.8,
  n_exp = 100, n_nexp = 100
)
}
\references{
Sanchez-Meca, J., Marin-Martinez, F., & Chacon-Moscoso, S. (2003). Effect-size indices for
dichotomized outcomes in meta-analysis. \emph{Psychological Methods}, 8(4), 448--467.
}
