The function makePaired() generates a dataset from
paired-sample t-test summary statistics.
makePaired() generates correlated values so the data replicate
rating scales taken, for example, in a before and after experimental design.
The function is effectively a wrapper function for
lfast() and lcor() with the addition of a
t-statistic from which the between-column correlation is inferred.
Paired t-tests apply to observations that are associated with each other.
For example: the same people before and after a treatment;
the same people rating two different objects; ratings by husband & wife;
etc.
The paired-samples t-test is defined as:
$$ t = \frac{\mathrm{mean}(D)}{\mathrm{sd}(D) / \sqrt{n}} $$
where:
\(D\) = differences in values
\(\mathrm{mean}(D)\) = mean of the differences
\(\mathrm{sd}(D)\) = standard deviation of the differences, where
$$ \mathrm{sd}(D)^2 = \mathrm{sd}(X_{\text{before}})^2 +
\mathrm{sd}(X_{\text{after}})^2 -
2\,\mathrm{cov}(X_{\text{before}},
X_{\text{after}}) $$
A paired-sample t-test thus requires an estimate of the covariance between
the two sets of observations.
makePaired() rearranges these formulae so that the covariance is
inferred from the t-statistic.