SOURCEBOOK

R Articles

Annotated Output | Regression

Computer Output

The descriptive statistics can be used to assist in calculating the correlation.

> lapply(CorrelationData, function(x) c(length(x), mean(x), sd(x)))
$Outcome1
[1] 4.00000 2.00000 2.44949

$Outcome2
[1] 4.00000 6.00000 2.44949

> cov(Outcome1,Outcome2)
[1] 3

The table of inferential statistics shows the key elements to be calculated.

> model <- lm(Outcome2 ~ Outcome1)
> summary(model)

Call:
lm(formula = Outcome2 ~ Outcome1)

Residuals:
   1    2    3    4
-1.0  2.0 -2.5  1.5

Coefficients:
            Estimate Std. Error t value Pr(>|t|)
(Intercept)   5.0000     1.7854   2.801    0.107
Outcome1      0.5000     0.6124   0.816    0.500

Residual standard error: 2.598 on 2 degrees of freedom
Multiple R-squared:   0.25,     Adjusted R-squared:  -0.125
F-statistic: 0.6667 on 1 and 2 DF,  p-value: 0.5

Calculations

Descriptive Statistics: The descriptive statistics are calculated separately for each variable.

Sum of Cross Products: The Sum of Cross Products (SCP) is not easily determined solely from the summary statistics of the output, but rather from the data.

\[SCP = \sum ( X - M_X ) ( Y - M_Y ) = ( 0 - 2.000 ) ( 4 - 6.000 ) + ( 0 - 2.000 )( 7 - 6.000 ) + ( 3 - 2.000 )( 4 - 6.000 ) + (5 - 2.000)(9 - 6.000) = 9.000\]

Covariance: The Covariance is a function of the Sum of Cross Products and the sample size:

\[COV = \frac{SCP}{(N - 1)} = \frac{9.000}{(4 - 1)} = 3.000\]

Unstandardized Regression Coefficients: The Unstandardized Regression Coefficients involve Covariance, the Standard Deviations of the variables, and the Means of the variables:

\[B_1 = \frac{COV}{(SD)^2} = \frac{3.000}{(2.449)^2} = 0.500\]
\[B_0 = M_Y - (B_1)(M_X) = 6.000 - (0.500)(2.000) = 5.000\]

Standardized Regression Coefficients: The Standard Regression Coefficients involve the Regression Coefficient (for the predictor) and the Standard Deviations of the variables:

\[\beta_1 = (B_1)\frac{SD_X}{SD_Y} = (0.500)\frac{2.449}{2.449} = 0.500\]

Multiple Correlation: In bivariate regression, the Multiple Correlation is the same as the bivariate Correlation:

\[r = \frac{COV}{(SD_X) (SD_Y)} = \frac{3.000}{(2.449) (2.449)} = .500\]

Proportion of Variance Accounted For: The Proportion of Variance Accounted For is a function of the Correlation:

\[R^2 = .0500^2 = 0.250\]

APA Style

Regression cofficients provide a measure of statistical relationship between two variables.

For the participants (N = 4), the scores on Outcome 1 (M = 2.00, SD = 2.45) moderately predicted Outcome 2 (M = 6.00, SD = 2.45), β = .500, R2= .250.

Note that regression coefficients can also have inferential information associated with them (and that this information should be summarized if it is available and of interest).

For the participants (N = 4), the scores on Outcome 1 (M = 2.00, SD = 2.45) did not significantly predict Outcome 2 (M = 6.00, SD = 2.45), β = .500, t = 0.816, p = .500.