<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: d-g Corrected for Independent t</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body>

<table width="100%" summary="page for g.ind.t"><tr><td>g.ind.t</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>d-g Corrected for Independent t</h2>

<h3>Description</h3>

<p>This function displays d-g corrected
and the non-central confidence interval for independent t.
</p>


<h3>Usage</h3>

<pre>
g.ind.t(m1, m2, sd1, sd2, n1, n2, a = 0.05)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>m1</code></td>
<td>
<p>mean group one</p>
</td></tr>
<tr valign="top"><td><code>m2</code></td>
<td>
<p>mean group two</p>
</td></tr>
<tr valign="top"><td><code>sd1</code></td>
<td>
<p>standard deviation group one</p>
</td></tr>
<tr valign="top"><td><code>sd2</code></td>
<td>
<p>standard deviation group two</p>
</td></tr>
<tr valign="top"><td><code>n1</code></td>
<td>
<p>sample size group one</p>
</td></tr>
<tr valign="top"><td><code>n2</code></td>
<td>
<p>sample size group two</p>
</td></tr>
<tr valign="top"><td><code>a</code></td>
<td>
<p>significance level</p>
</td></tr>
</table>


<h3>Details</h3>

<p>The correction is calculated by dividing three by the sum of both
sample sizes after multiplying by four and subtracting nine.
This amount is deducted from one.
</p>
<p>correction = 1 - (3 / (4 * (n1 + n2) - 9))
</p>
<p>D-g corrected is calculated by substracting mean two from mean one,
dividing by the pooled standard deviation which is multiplied
by the correction above.
</p>
<p>d_g corrected = ((m1 - m2) / spooled) * correction
</p>
<p><a href="https://www.aggieerin.com/shiny-server/tests/indtg.html">Learn more on our example page.</a>
</p>


<h3>Value</h3>

<p>D-g corrected with associated confidence intervals,
the confidence intervals associated with the means of each group,
standard deviations of the means for each group, relevant statistics.
</p>
<table summary="R valueblock">
<tr valign="top"><td><code>d</code></td>
<td>
<p>d-g corrected effect size</p>
</td></tr>
<tr valign="top"><td><code>dlow</code></td>
<td>
<p>lower level confidence interval d-g corrected</p>
</td></tr>
<tr valign="top"><td><code>dhigh</code></td>
<td>
<p>upper level confidence interval d-g corrected</p>
</td></tr>
<tr valign="top"><td><code>M1</code></td>
<td>
<p>mean group one</p>
</td></tr>
<tr valign="top"><td><code>sd1</code></td>
<td>
<p>standard deviation of group one</p>
</td></tr>
<tr valign="top"><td><code>se1</code></td>
<td>
<p>standard error of group one</p>
</td></tr>
<tr valign="top"><td><code>M1low</code></td>
<td>
<p>lower level confidence interval of mean one</p>
</td></tr>
<tr valign="top"><td><code>M1high</code></td>
<td>
<p>upper level confidence interval of mean one</p>
</td></tr>
<tr valign="top"><td><code>M2</code></td>
<td>
<p>mean two</p>
</td></tr>
<tr valign="top"><td><code>sd2</code></td>
<td>
<p>standard deviation of mean two</p>
</td></tr>
<tr valign="top"><td><code>se1</code></td>
<td>
<p>standard error of mean two</p>
</td></tr>
<tr valign="top"><td><code>M2low</code></td>
<td>
<p>lower level confidence interval of mean two</p>
</td></tr>
<tr valign="top"><td><code>M2high</code></td>
<td>
<p>upper level confidence interval of mean two</p>
</td></tr>
<tr valign="top"><td><code>spooled</code></td>
<td>
<p>pooled standard deviation</p>
</td></tr>
<tr valign="top"><td><code>sepooled</code></td>
<td>
<p>pooled standard error</p>
</td></tr>
<tr valign="top"><td><code>correction</code></td>
<td>
<p>g corrected</p>
</td></tr>
<tr valign="top"><td><code>n1</code></td>
<td>
<p>size of sample one</p>
</td></tr>
<tr valign="top"><td><code>n2</code></td>
<td>
<p>size of sample two</p>
</td></tr>
<tr valign="top"><td><code>df</code></td>
<td>
<p>degrees of freedom</p>
</td></tr>
<tr valign="top"><td><code>t</code></td>
<td>
<p>t-statistic</p>
</td></tr>
<tr valign="top"><td><code>p</code></td>
<td>
<p>p-value</p>
</td></tr>
<tr valign="top"><td><code>estimate</code></td>
<td>
<p>the d statistic and confidence interval in
APA style for markdown printing</p>
</td></tr>
<tr valign="top"><td><code>statistic</code></td>
<td>
<p>the t-statistic in APA style for markdown printing</p>
</td></tr>
</table>


<h3>Examples</h3>

<pre>

#The following example is derived from the "indt_data" dataset, included
#in the MOTE library.

#A forensic psychologist conducted a study to examine whether
#being hypnotized during recall affects how well a witness
#can remember facts about an event. Eight participants
#watched a short film of a mock robbery, after which
#each participant was questioned about what he or she had
#seen. The four participants in the experimental group
#were questioned while they were hypnotized. The four
#participants in the control group recieved the same
#questioning without hypnosis.

    t.test(correctq ~ group, data = indt_data)

#You can type in the numbers directly, or refer to the dataset,
#as shown below.

    g.ind.t(m1 = 17.75, m2 = 23, sd1 = 3.30,
           sd2 = 2.16, n1 = 4, n2 = 4, a = .05)

    g.ind.t(17.75, 23, 3.30, 2.16, 4, 4, .05)

    g.ind.t(mean(indt_data$correctq[indt_data$group == 1]),
            mean(indt_data$correctq[indt_data$group == 2]),
            sd(indt_data$correctq[indt_data$group == 1]),
            sd(indt_data$correctq[indt_data$group == 2]),
            length(indt_data$correctq[indt_data$group == 1]),
            length(indt_data$correctq[indt_data$group == 2]),
            .05)

#Contrary to the hypothesized result, the group that underwent hypnosis were
#significantly less accurate while reporting facts than the control group
#with a large effect size, t(6) = -2.66, p = .038, d_g = 1.64.

</pre>


</body></html>
