Professional Documents
Culture Documents
- - -
.9
- - - - -
.85
BPF
- - -
.8
- - - - -
.75
F M
gender
• The regression equation can be rewritten as
BPFfemale = b0 + e i
BPFmale = b0 + b1 + e i
• What is the meaning of the coefficients in this case?
– b0 is the mean BPF when male=0
• The females
– b0 + b1 is the mean BPF when male=1
• The males
• What is the interpretation of b1?
– For a one-unit increase in sex, there is a b1 increase in
mean of the BPF (needs to be interpreted in terms how
the variable was coded in the dataset)
– The difference in mean BPF between the males and
females
. regress bpf male
Estimated intercept, b0
BPFˆ = bˆ0 + bˆ1 *male
Group Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
Sample mean
0
in males
22 .8228636 .0096717 .0453645 .8027502 .8429771
1 7 .86 .0196457 . 8119288 .9080712
95% CI for group difference
.0519775
Estimated group
Ha: diff < 0difference Ha: diff != 0
r(|T| > |t|) = 0.0792
Ha: diff > 0
Pr(T > t) = 0.9604
Pr(T < t) = 0.0396 P
Note that the sample means and p-value for two group
comparison are the same as we obtained from our regression
analysis
p-value for four group comparison p-value for four group comparison
Hypothesis test
1) H0: No difference in the mean HI between groups:
b1 = b2 = b3 =0
2) Continuous outcome, categorical predictor
3) Linear regression
4) Test statistic: F=5.04 (3,101 dof)
5) p-value=0.0027
6) Since the p-value is less than 0.05, we reject the
null hypothesis
7) We conclude that there is a significant difference in
the mean HI between the groups
Comparison to ANOVA
• As we know, we could have investigated this
same hypothesis using one-way ANOVA
Hypothesis test
1) H0: No difference in the mean HI between groups:
µHC = µBMS = µSPMS = µPPMS
2) Continuous outcome, categorical predictor
3) ANOVA test
4) Test statistic: F=5.04 (3,101 dof)
5) p-value=0.0027
6) Since the p-value is less than 0.05, we reject the
null hypothesis
7) We conclude that there is a significant difference in
the mean HI between the groups
STATA output
. oneway hypo group,tab
group
Summary of hypo
Mean Std. Dev. Freq.
Estimated group
0 .41159755 .01696495 25
means
1 .40037495 .02344147 30
2 .39322455 .02235947 28
3 .38937768 .02218831 22
Analysis of Variance
Source SS df MS F Prob > F
Note that the sample means and p-value are the same as we
obtained from our regression analysis
AWESOME!!
Pairwise comparisons
• Since we found a significant difference among
the groups, we would like to know which
groups were significantly different. Therefore,
we would like to test if the differences
between the groups are statistically significant
• Using the regression output, we can calculate
these p-values unadjusted for multiple
comparisons
. regress hypo bms spms ppms
( 1) bms - spms = 0
F( 1, 101) = 1.60
Prob > F = 0.2085
0.004
the # of
HC PPMS -0.022 0.00062 comparisons
Summary of hypo
group Mean Std. Dev. Freq.
0 .41159755 .01696495 25
1 .40037495 .02344147 30
2 .39322455 .02235947 28
3 .38937768 .02218831 22
Analysis of Variance
Source SS df MS F Prob > F
2 -.018373 -.00715
0.015 1.000 Bonferroni
3 -.02222
0.004
-.010997
0.428
-.003847
1.000
corrected p-values
Conclusion
• Indicator variables can be used to represent
dichotomous variables in a regression equation