{"id":1055,"date":"2020-06-02T20:31:08","date_gmt":"2020-06-03T00:31:08","guid":{"rendered":"http:\/\/pressbooks.library.upei.ca\/montelpare\/?post_type=chapter&#038;p=1055"},"modified":"2020-09-01T06:42:43","modified_gmt":"2020-09-01T10:42:43","slug":"research-design-applications-with-proc-glm","status":"publish","type":"chapter","link":"https:\/\/pressbooks.library.upei.ca\/montelpare\/chapter\/research-design-applications-with-proc-glm\/","title":{"raw":"Research Design Applications with PROC GLM","rendered":"Research Design Applications with PROC GLM"},"content":{"raw":"<div class=\"textbox textbox--learning-objectives\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Learner Outcomes<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nAfter reading this chapter you should be able to:\r\n<ul>\r\n \t<li>Compute the significance of the difference between three or more sample means using PROC GLM for the one-way analysis of variance test<\/li>\r\n \t<li>Compute the significance of the association between an outcome and one or several predictors using PROC GLM as a linear regression model<\/li>\r\n \t<li>Compute the post hoc comparison between sample means when the F statistic is significant using posthoc analysis procedures (in either ANOVA applications or linear regression applications)<\/li>\r\n \t<li><\/li>\r\n<\/ul>\r\n<\/div>\r\n<\/div>\r\n<strong>INTRODUCTION TO<\/strong><strong> GENERAL LINEAR MODELS IN SAS <\/strong>\r\n\r\nA univariate general linear model is defined as a statistical model in which a dependent variable is modeled in relation to a set of predictor variables. The predictor variables can be categorical independent variables with multiple levels, or they can be a continuous variable, or the predictor variables can be a combination of categorical and continuous independent variables. In the application of statistical processing for research designs, where the dependent variable is a continuous scaled score, and the independent variables are categorically scored, the researcher can use either the analysis of variance or a general linear model.\r\n\r\nIn SAS, the F statistic can be computed with either the PROC ANOVA procedures described previously or with the PROC GLM procedure with similar post-analytic processes to establish not only the significance of the main effects but also of the characteristics of the distribution, like measures of normality and equality of variance, there are limitations to the application of the PROC ANOVA which suggest that the use of PROC GLM is more appropriate. For example, the PROC GLM procedure is preferable to PROC ANOVA when using unbalanced comparison groups, when combining categorical and continuous predictors as in an analysis of covariance, and when attempting to evaluate the dependent measure using complex interactions as in nested designs.\r\n\r\nIn this chapter, we will explore the SAS application of the PROC GLM procedures to evaluate the F statistic represented by the statement: F = variance between samples divided by the variance within samples. Next, we will explore the relationship between the outcome and predictor variables based on the concept that the dependent variable = independent variable \u00b1 error, which we can represent algebraically as: [latex] Y_{ij} = \\beta_{0} \\pm \\beta_{i}X_{i} + \\epsilon[\/latex]\r\n\r\nExtending from this General Linear Model (GLM) approach, we will introduce the General Linear <strong>Mixed<\/strong> Model, which we will analyze with the <strong>PROC MIXED<\/strong> application, which adds the following parameter [latex] U_{i}[\/latex] into the General Linear Model Equation. This parameter represents the random effect in the model. [latex] Y_{ij} = \\beta_{0} \\pm \\beta_{i}X_{i} \\pm U_{i} + \\epsilon[\/latex]\r\n\r\n<strong>Applying PROC GLM to evaluate a one-way ANOVA design. <\/strong>\r\n\r\nThe following describes a 12 week experiment in which researchers were interested in the effects of coffee consumption on resting systolic blood pressure for a sample of healthy male participants.\u00a0 The study participants were randomly selected from the total sample of volunteers and randomly allocated into three groups.\u00a0 Group 1 was comprised of 20 individuals that were asked to consume a total of 2000 ml of coffee each morning of the 12-week program between the hours of 6 and 8 am.\u00a0 Group 2 was comprised of 20 individuals that were asked to consume a total of 2000 ml of de-caffeinated coffee each morning of the 12-week program between the hours of 6 and 8 am, and Group 3 was comprised of 20 individuals that were asked to consume a total of 2000 ml of hot water with no additive each morning of the 12-week program between the hours of 6 and 8 am. Resting systolic blood pressure measures were taken on day 84 and recorded in the following table. The dependent variable was then determined to be the systolic resting blood pressure on day 84. The raw data and SAS code are shown below:\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>Group 1 \u2013 caffeinated coffee\r\n\r\nSystolic Blood Pressure (mmHg)<\/td>\r\n<td>Group 2 \u2013 de-caffeinated coffee\r\n\r\nSystolic Blood Pressure (mmHg)<\/td>\r\n<td>Group 3 \u2013 Placebo\r\n\r\nSystolic Blood Pressure (mmHg)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>134<\/td>\r\n<td>115<\/td>\r\n<td>125<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>152<\/td>\r\n<td>114<\/td>\r\n<td>126<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>161<\/td>\r\n<td>119<\/td>\r\n<td>128<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>139<\/td>\r\n<td>115<\/td>\r\n<td>122<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>149<\/td>\r\n<td>114<\/td>\r\n<td>126<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>158<\/td>\r\n<td>113<\/td>\r\n<td>117<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>167<\/td>\r\n<td>115<\/td>\r\n<td>113<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>151<\/td>\r\n<td>111<\/td>\r\n<td>116<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>148<\/td>\r\n<td>123<\/td>\r\n<td>114<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>144<\/td>\r\n<td>110<\/td>\r\n<td>115<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>124<\/td>\r\n<td>115<\/td>\r\n<td>129<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>122<\/td>\r\n<td>116<\/td>\r\n<td>116<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>121<\/td>\r\n<td>113<\/td>\r\n<td>118<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>129<\/td>\r\n<td>119<\/td>\r\n<td>112<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>129<\/td>\r\n<td>111<\/td>\r\n<td>116<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>128<\/td>\r\n<td>112<\/td>\r\n<td>127<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>127<\/td>\r\n<td>110<\/td>\r\n<td>123<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>131<\/td>\r\n<td>115<\/td>\r\n<td>126<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>128<\/td>\r\n<td>111<\/td>\r\n<td>124<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>124<\/td>\r\n<td>114<\/td>\r\n<td>125<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<div class=\"textbox shaded\">options pagesize=55 linesize=120 center date;\r\ndata glm1;\r\nTitle 'GLM analysis of Systolic Blood Pressure Data';\r\ninput id 1-2 @4 grp sysbp;\r\ndatalines;\r\n134 115 125\r\n152 114 126\r\n161 119 128\r\n139 115 122\r\n149 114 126\r\n158 113 117\r\n167 115 113\r\n151 111 116\r\n148 123 114\r\n144 110 115\r\n124 115 129\r\n122 116 116\r\n121 113 118\r\n129 119 112\r\n129 111 116\r\n128 112 127\r\n127 110 123\r\n131 115 126\r\n128 111 124\r\n124 114 125\r\n;\r\nproc sort data=glm1; by id;\r\nproc glm;\r\nclass grp; model sysbp = grp;\r\nrun;<\/div>\r\nThe output from this SAS Program is explained below.\r\n\r\n<strong>GLM analysis of Systolic Blood Pressure Data using Systolic Blood Pressure (SYSBP) as the <\/strong><strong>Dependent Variable<\/strong>\r\n<div align=\"center\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<td><strong>Source<\/strong><\/td>\r\n<td><strong>DF<\/strong><\/td>\r\n<td><strong>Sum of Squares<\/strong><\/td>\r\n<td><strong>Mean Square<\/strong><\/td>\r\n<td><strong>F Value<\/strong><\/td>\r\n<td><strong>Pr\u00a0&gt;\u00a0F<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td><strong>Model<\/strong><\/td>\r\n<td>2<\/td>\r\n<td>6169.23333<\/td>\r\n<td>3084.61667<\/td>\r\n<td>37.57<\/td>\r\n<td>&lt;.0001<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Error<\/strong><\/td>\r\n<td>57<\/td>\r\n<td>4679.75000<\/td>\r\n<td>82.10088<\/td>\r\n<td><\/td>\r\n<td><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Corrected Total<\/strong><\/td>\r\n<td>59<\/td>\r\n<td>10848.98333<\/td>\r\n<td><\/td>\r\n<td><\/td>\r\n<td><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<div align=\"center\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<td><strong>R-Square<\/strong><\/td>\r\n<td><strong>Coeff Var<\/strong><\/td>\r\n<td><strong>Root MSE<\/strong><\/td>\r\n<td><strong>sysbp\u00a0Mean<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>0.568646<\/td>\r\n<td>7.278849<\/td>\r\n<td>9.060953<\/td>\r\n<td>124.4833<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<div align=\"center\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<td><strong>Source<\/strong><\/td>\r\n<td><strong>DF<\/strong><\/td>\r\n<td><strong>Type I SS<\/strong><\/td>\r\n<td><strong>Mean Square<\/strong><\/td>\r\n<td><strong>F Value<\/strong><\/td>\r\n<td><strong>Pr\u00a0&gt;\u00a0F<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td><strong>grp<\/strong><\/td>\r\n<td>2<\/td>\r\n<td>6169.233333<\/td>\r\n<td>3084.616667<\/td>\r\n<td>37.57<\/td>\r\n<td>&lt;.0001<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<div align=\"center\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<td><strong>Source<\/strong><\/td>\r\n<td><strong>DF<\/strong><\/td>\r\n<td><strong>Type III SS<\/strong><\/td>\r\n<td><strong>Mean Square<\/strong><\/td>\r\n<td><strong>F Value<\/strong><\/td>\r\n<td><strong>Pr\u00a0&gt;\u00a0F<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td><strong>grp<\/strong><\/td>\r\n<td>2<\/td>\r\n<td>6169.233333<\/td>\r\n<td>3084.616667<\/td>\r\n<td>37.57<\/td>\r\n<td>&lt;.0001<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\nThe comparison of means across groups was analyzed using the SAS code <strong>lsmeans grp\/ adjust= scheffe;\u00a0 <\/strong>as shown here.\r\n<strong>GLM analysis of Systolic Blood Pressure Data<\/strong>\r\n<strong>The GLM Procedure using <\/strong><strong>Least Squares Means <\/strong><strong>Adjustment for Multiple Comparisons: Scheffe<\/strong>\r\n<div align=\"center\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<td><strong>grp<\/strong><\/td>\r\n<td><strong>sysbp LSMEAN<\/strong><\/td>\r\n<td><strong>LSMEAN Number<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td><strong>1<\/strong><\/td>\r\n<td>138.300000<\/td>\r\n<td>1<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>2<\/strong><\/td>\r\n<td>114.250000<\/td>\r\n<td>2<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>3<\/strong><\/td>\r\n<td>120.900000<\/td>\r\n<td>3<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<div align=\"center\">\r\n<table class=\" aligncenter\" style=\"width: 514px;height: 120px\">\r\n<thead>\r\n<tr class=\"shaded\" style=\"height: 60px\">\r\n<td colspan=\"4\"><strong><strong>Least Squares Means for effect grp\r\nPr &gt; |t| for H0: LSMean(i)=LSMean(j)<\/strong><\/strong>Dependent Variable: sysbp<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px\">\r\n<td style=\"width: 249.45px;height: 15px\"><strong>i\/j<\/strong><\/td>\r\n<td style=\"width: 71.85px;height: 15px\"><strong>1<\/strong><\/td>\r\n<td style=\"width: 78.25px;height: 15px\"><strong>2<\/strong><\/td>\r\n<td style=\"width: 61.45px;height: 15px\"><strong>3<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr style=\"height: 15px\">\r\n<td style=\"width: 249.45px;height: 15px\"><strong>1<\/strong><\/td>\r\n<td style=\"width: 71.85px;height: 15px\"><\/td>\r\n<td style=\"width: 78.25px;height: 15px\">&lt;.0001<\/td>\r\n<td style=\"width: 61.45px;height: 15px\">&lt;.0001<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px\">\r\n<td style=\"width: 249.45px;height: 15px\"><strong>2<\/strong><\/td>\r\n<td style=\"width: 71.85px;height: 15px\">&lt;.0001<\/td>\r\n<td style=\"width: 78.25px;height: 15px\"><\/td>\r\n<td style=\"width: 61.45px;height: 15px\">0.0763<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px\">\r\n<td style=\"width: 249.45px;height: 15px\"><strong>3<\/strong><\/td>\r\n<td style=\"width: 71.85px;height: 15px\">&lt;.0001<\/td>\r\n<td style=\"width: 78.25px;height: 15px\">0.0763<\/td>\r\n<td style=\"width: 61.45px;height: 15px\"><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<strong>means grp \/hovtest welch tukey scheffe;<\/strong>\r\n\r\n<strong>GLM analysis of Systolic Blood Pressure Data- Main Effects Analysis<\/strong>\r\n<div align=\"center\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<td colspan=\"6\"><strong>Levene's Test for Homogeneity of sysbp Variance\r\nANOVA of Squared Deviations from Group Means<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Source<\/strong><\/td>\r\n<td><strong>DF<\/strong><\/td>\r\n<td><strong>Sum of Squares<\/strong><\/td>\r\n<td><strong>Mean Square<\/strong><\/td>\r\n<td><strong>F Value<\/strong><\/td>\r\n<td><strong>Pr\u00a0&gt;\u00a0F<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td><strong>grp<\/strong><\/td>\r\n<td>2<\/td>\r\n<td>406309<\/td>\r\n<td>203155<\/td>\r\n<td>15.59<\/td>\r\n<td>&lt;.0001<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Error<\/strong><\/td>\r\n<td>57<\/td>\r\n<td>742833<\/td>\r\n<td>13032.2<\/td>\r\n<td><\/td>\r\n<td><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<div align=\"center\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<td><strong>Welch's ANOVA for sysbp<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Source<\/strong><\/td>\r\n<td><strong>DF<\/strong><\/td>\r\n<td><strong>F Value<\/strong><\/td>\r\n<td><strong>Pr\u00a0&gt;\u00a0F<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td><strong>grp<\/strong><\/td>\r\n<td>2.0000<\/td>\r\n<td>33.35<\/td>\r\n<td>&lt;.0001<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Error<\/strong><\/td>\r\n<td>32.1316<\/td>\r\n<td><\/td>\r\n<td><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<strong>\u00a0<\/strong><strong>GLM analysis of Systolic Blood Pressure Data with the Post Hoc <\/strong><strong style=\"text-align: initial;font-size: 1em\">t Tests (LSD) for sysbp<\/strong>\r\n\r\n<strong>Note: <\/strong>This test controls the Type I comparison wise error rate, not the experiment wise error rate.\r\n<div align=\"center\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Alpha<\/strong><\/td>\r\n<td>0.05<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Error Degrees of Freedom<\/strong><\/td>\r\n<td>57<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Error Mean Square<\/strong><\/td>\r\n<td>82.10088<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Critical Value of t<\/strong><\/td>\r\n<td>2.00247<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Least Significant Difference<\/strong><\/td>\r\n<td>5.7377<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<div align=\"center\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<td colspan=\"4\"><strong>Means with the same letter are not significantly different.<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>t\u00a0Grouping<\/strong><\/td>\r\n<td><strong>Mean<\/strong><\/td>\r\n<td><strong>N<\/strong><\/td>\r\n<td><strong>grp<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>A<\/td>\r\n<td>138.300<\/td>\r\n<td>20<\/td>\r\n<td>1<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>B<\/td>\r\n<td>120.900<\/td>\r\n<td>20<\/td>\r\n<td>3<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>C<\/td>\r\n<td>114.250<\/td>\r\n<td>20<\/td>\r\n<td>2<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<strong>\u00a0<\/strong><strong>GLM analysis of Systolic Blood Pressure Data with the <\/strong><strong style=\"text-align: initial;font-size: 1em\">Tukey's Studentized Range (HSD) Test for sysbp<\/strong>\r\n\r\n<strong>\u00a0<\/strong><strong>Note: <\/strong>This test controls the Type I experiment-wise error rate, but it generally has a higher Type II error rate than REGWQ.\r\n<div align=\"center\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Alpha<\/strong><\/td>\r\n<td>0.05<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Error Degrees of Freedom<\/strong><\/td>\r\n<td>57<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Error Mean Square<\/strong><\/td>\r\n<td>82.10088<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Critical Value of Studentized Range<\/strong><\/td>\r\n<td>3.40311<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Minimum Significant Difference<\/strong><\/td>\r\n<td>6.895<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<div align=\"center\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<td colspan=\"4\"><strong>Means with the same letter are not significantly different.<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Tukey\u00a0Grouping<\/strong><\/td>\r\n<td><strong>Mean<\/strong><\/td>\r\n<td><strong>N<\/strong><\/td>\r\n<td><strong>grp<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>A<\/td>\r\n<td>138.300<\/td>\r\n<td>20<\/td>\r\n<td>1<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>B<\/td>\r\n<td>120.900<\/td>\r\n<td>20<\/td>\r\n<td>3<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>B<\/td>\r\n<td>114.250<\/td>\r\n<td>20<\/td>\r\n<td>2<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<strong>GLM analysis of Systolic Blood Pressure Data with the\u00a0<\/strong><strong>Scheffe's Test for sysbp<\/strong>\r\n\r\n<strong>Note: <\/strong>This test controls the Type I experiment-wise error rate.\r\n<div align=\"center\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Alpha<\/strong><\/td>\r\n<td>0.05<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Error Degrees of Freedom<\/strong><\/td>\r\n<td>57<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Error Mean Square<\/strong><\/td>\r\n<td>82.10088<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Critical Value of F<\/strong><\/td>\r\n<td>3.15884<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Minimum Significant Difference<\/strong><\/td>\r\n<td>7.202<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<div align=\"center\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<td colspan=\"4\"><strong>Means with the same letter are not significantly different.<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Scheffe\u00a0Grouping<\/strong><\/td>\r\n<td><strong>Mean<\/strong><\/td>\r\n<td><strong>N<\/strong><\/td>\r\n<td><strong>grp<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>A<\/td>\r\n<td>138.300<\/td>\r\n<td>20<\/td>\r\n<td>1<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>B<\/td>\r\n<td>120.900<\/td>\r\n<td>20<\/td>\r\n<td>3<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>B<\/td>\r\n<td>114.250<\/td>\r\n<td>20<\/td>\r\n<td>2<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\nIf we rerun the analysis with the class statement removed we can generate the coefficients for the independent variables.\r\n\r\n<strong>proc glm ;\r\nmodel sysbp = grp;<\/strong>\r\n<div align=\"center\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<td><strong>Parameter<\/strong><\/td>\r\n<td><strong>Estimate<\/strong><\/td>\r\n<td><strong>Standard\r\nError<\/strong><\/td>\r\n<td><strong>t\u00a0Value<\/strong><\/td>\r\n<td><strong>Pr\u00a0&gt;\u00a0|t|<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td><strong>Intercept<\/strong><\/td>\r\n<td>141.8833333<\/td>\r\n<td>3.96644269<\/td>\r\n<td>35.77<\/td>\r\n<td>&lt;.0001<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>grp<\/strong><\/td>\r\n<td>-8.7000000<\/td>\r\n<td>1.83610618<\/td>\r\n<td>-4.74<\/td>\r\n<td>&lt;.0001<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<strong>\u00a0<\/strong><strong>Adding A Second Grouping Factor To a GLM Model<\/strong>\r\n\r\nConsider the analysis we used in the PROC ANOVA computations used in Chapter 9, where we were interested in evaluating the effects of a one-hour activity break into the workday, believing that such an opportunity could reduce the resting heart rates of the participants and thereby lead to a healthier workforce.\r\n\r\nYou will recall that the research design began with 66 participants that were randomly selected from a sample of employees within the company, and randomly allocated to one of three treatment groups.\u00a0 In the following analysis, we used PROC GLM and the post hoc procedure LSMEANS\u00a0 to evaluate the cell-wise interaction component to evaluate the individual cell means between the treatment levels (walking versus dancing versus book reading), for each level of sex (males versus females).\r\n\r\n<strong>PROC glm data=anova2x3;\r\ntitle 'Using PROCGLM to determine interaction effect ';\r\nclass sex group ;\r\nmodel hrchange =sex group sex*group;\r\nlsmeans sex*group\/ diff;\r\nrun;<\/strong>\r\n\r\nThe results from the LSMEANS analysis are shown here Using PROC GLM to determine interaction effect\r\n\r\n<strong>The GLM Procedure:\u00a0<\/strong><strong>Least Squares Means<\/strong>\r\n<div align=\"center\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<td><strong>sex<\/strong><\/td>\r\n<td><strong>group<\/strong><\/td>\r\n<td><strong>hrchange LSMEAN<\/strong><\/td>\r\n<td><strong>LSMEAN Number<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td><strong>F<\/strong><\/td>\r\n<td><strong>1<\/strong><\/td>\r\n<td>-4.5454545<\/td>\r\n<td>1<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>F<\/strong><\/td>\r\n<td><strong>2<\/strong><\/td>\r\n<td>-10.3181818<\/td>\r\n<td>2<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>F<\/strong><\/td>\r\n<td><strong>3<\/strong><\/td>\r\n<td>5.8181818<\/td>\r\n<td>3<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>M<\/strong><\/td>\r\n<td><strong>1<\/strong><\/td>\r\n<td>-4.2727273<\/td>\r\n<td>4<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>M<\/strong><\/td>\r\n<td><strong>2<\/strong><\/td>\r\n<td>-2.0000000<\/td>\r\n<td>5<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>M<\/strong><\/td>\r\n<td><strong>3<\/strong><\/td>\r\n<td>6.5454545<\/td>\r\n<td>6<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<div align=\"center\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<td colspan=\"7\"><strong><strong>Least Squares Means for effect sex*group\r\nPr &gt; |t| for H0: LSMean(i)=LSMean(j)<\/strong><\/strong>Dependent Variable: hrchange<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>i\/j<\/strong><\/td>\r\n<td><strong>1<\/strong><\/td>\r\n<td><strong>2<\/strong><\/td>\r\n<td><strong>3<\/strong><\/td>\r\n<td><strong>4<\/strong><\/td>\r\n<td><strong>5<\/strong><\/td>\r\n<td><strong>6<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td><strong>1<\/strong><\/td>\r\n<td><\/td>\r\n<td>&lt;.0001<\/td>\r\n<td>&lt;.0001<\/td>\r\n<td>0.8183<\/td>\r\n<td>0.0336<\/td>\r\n<td>&lt;.0001<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>2<\/strong><\/td>\r\n<td>&lt;.0001<\/td>\r\n<td><\/td>\r\n<td>&lt;.0001<\/td>\r\n<td>&lt;.0001<\/td>\r\n<td>&lt;.0001<\/td>\r\n<td>&lt;.0001<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>3<\/strong><\/td>\r\n<td>&lt;.0001<\/td>\r\n<td>&lt;.0001<\/td>\r\n<td><\/td>\r\n<td>&lt;.0001<\/td>\r\n<td>&lt;.0001<\/td>\r\n<td>0.5404<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>4<\/strong><\/td>\r\n<td><span style=\"background-color: #ff0000\">0.8183<\/span><\/td>\r\n<td>&lt;.0001<\/td>\r\n<td>&lt;.0001<\/td>\r\n<td><\/td>\r\n<td>0.0573<\/td>\r\n<td>&lt;.0001<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>5<\/strong><\/td>\r\n<td>0.0336<\/td>\r\n<td>&lt;.0001<\/td>\r\n<td>&lt;.0001<\/td>\r\n<td><span style=\"background-color: #ff0000\">0.0573<\/span><\/td>\r\n<td><\/td>\r\n<td>&lt;.0001<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>6<\/strong><\/td>\r\n<td>&lt;.0001<\/td>\r\n<td>&lt;.0001<\/td>\r\n<td><span style=\"background-color: #ff0000\">0.5404<\/span><\/td>\r\n<td>&lt;.0001<\/td>\r\n<td>&lt;.0001<\/td>\r\n<td><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\nNotice the matrix indicates the probability level at which the pairwise comparisons between cell means are different. Sine most comparisons were significantly different, only the comparisons that showed a probability level of p &gt;0.05, are highlighted in red. These results support the notion that being physically active, whether it be dancing or walking as planned exercise, has a positive effect on reducing resting heart rates, and more so for females than males.","rendered":"<div class=\"textbox textbox--learning-objectives\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Learner Outcomes<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>After reading this chapter you should be able to:<\/p>\n<ul>\n<li>Compute the significance of the difference between three or more sample means using PROC GLM for the one-way analysis of variance test<\/li>\n<li>Compute the significance of the association between an outcome and one or several predictors using PROC GLM as a linear regression model<\/li>\n<li>Compute the post hoc comparison between sample means when the F statistic is significant using posthoc analysis procedures (in either ANOVA applications or linear regression applications)<\/li>\n<li><\/li>\n<\/ul>\n<\/div>\n<\/div>\n<p><strong>INTRODUCTION TO<\/strong><strong> GENERAL LINEAR MODELS IN SAS <\/strong><\/p>\n<p>A univariate general linear model is defined as a statistical model in which a dependent variable is modeled in relation to a set of predictor variables. The predictor variables can be categorical independent variables with multiple levels, or they can be a continuous variable, or the predictor variables can be a combination of categorical and continuous independent variables. In the application of statistical processing for research designs, where the dependent variable is a continuous scaled score, and the independent variables are categorically scored, the researcher can use either the analysis of variance or a general linear model.<\/p>\n<p>In SAS, the F statistic can be computed with either the PROC ANOVA procedures described previously or with the PROC GLM procedure with similar post-analytic processes to establish not only the significance of the main effects but also of the characteristics of the distribution, like measures of normality and equality of variance, there are limitations to the application of the PROC ANOVA which suggest that the use of PROC GLM is more appropriate. For example, the PROC GLM procedure is preferable to PROC ANOVA when using unbalanced comparison groups, when combining categorical and continuous predictors as in an analysis of covariance, and when attempting to evaluate the dependent measure using complex interactions as in nested designs.<\/p>\n<p>In this chapter, we will explore the SAS application of the PROC GLM procedures to evaluate the F statistic represented by the statement: F = variance between samples divided by the variance within samples. Next, we will explore the relationship between the outcome and predictor variables based on the concept that the dependent variable = independent variable \u00b1 error, which we can represent algebraically as: [latex]Y_{ij} = \\beta_{0} \\pm \\beta_{i}X_{i} + \\epsilon[\/latex]<\/p>\n<p>Extending from this General Linear Model (GLM) approach, we will introduce the General Linear <strong>Mixed<\/strong> Model, which we will analyze with the <strong>PROC MIXED<\/strong> application, which adds the following parameter [latex]U_{i}[\/latex] into the General Linear Model Equation. This parameter represents the random effect in the model. [latex]Y_{ij} = \\beta_{0} \\pm \\beta_{i}X_{i} \\pm U_{i} + \\epsilon[\/latex]<\/p>\n<p><strong>Applying PROC GLM to evaluate a one-way ANOVA design. <\/strong><\/p>\n<p>The following describes a 12 week experiment in which researchers were interested in the effects of coffee consumption on resting systolic blood pressure for a sample of healthy male participants.\u00a0 The study participants were randomly selected from the total sample of volunteers and randomly allocated into three groups.\u00a0 Group 1 was comprised of 20 individuals that were asked to consume a total of 2000 ml of coffee each morning of the 12-week program between the hours of 6 and 8 am.\u00a0 Group 2 was comprised of 20 individuals that were asked to consume a total of 2000 ml of de-caffeinated coffee each morning of the 12-week program between the hours of 6 and 8 am, and Group 3 was comprised of 20 individuals that were asked to consume a total of 2000 ml of hot water with no additive each morning of the 12-week program between the hours of 6 and 8 am. Resting systolic blood pressure measures were taken on day 84 and recorded in the following table. The dependent variable was then determined to be the systolic resting blood pressure on day 84. The raw data and SAS code are shown below:<\/p>\n<table>\n<tbody>\n<tr>\n<td>Group 1 \u2013 caffeinated coffee<\/p>\n<p>Systolic Blood Pressure (mmHg)<\/td>\n<td>Group 2 \u2013 de-caffeinated coffee<\/p>\n<p>Systolic Blood Pressure (mmHg)<\/td>\n<td>Group 3 \u2013 Placebo<\/p>\n<p>Systolic Blood Pressure (mmHg)<\/td>\n<\/tr>\n<tr>\n<td>134<\/td>\n<td>115<\/td>\n<td>125<\/td>\n<\/tr>\n<tr>\n<td>152<\/td>\n<td>114<\/td>\n<td>126<\/td>\n<\/tr>\n<tr>\n<td>161<\/td>\n<td>119<\/td>\n<td>128<\/td>\n<\/tr>\n<tr>\n<td>139<\/td>\n<td>115<\/td>\n<td>122<\/td>\n<\/tr>\n<tr>\n<td>149<\/td>\n<td>114<\/td>\n<td>126<\/td>\n<\/tr>\n<tr>\n<td>158<\/td>\n<td>113<\/td>\n<td>117<\/td>\n<\/tr>\n<tr>\n<td>167<\/td>\n<td>115<\/td>\n<td>113<\/td>\n<\/tr>\n<tr>\n<td>151<\/td>\n<td>111<\/td>\n<td>116<\/td>\n<\/tr>\n<tr>\n<td>148<\/td>\n<td>123<\/td>\n<td>114<\/td>\n<\/tr>\n<tr>\n<td>144<\/td>\n<td>110<\/td>\n<td>115<\/td>\n<\/tr>\n<tr>\n<td>124<\/td>\n<td>115<\/td>\n<td>129<\/td>\n<\/tr>\n<tr>\n<td>122<\/td>\n<td>116<\/td>\n<td>116<\/td>\n<\/tr>\n<tr>\n<td>121<\/td>\n<td>113<\/td>\n<td>118<\/td>\n<\/tr>\n<tr>\n<td>129<\/td>\n<td>119<\/td>\n<td>112<\/td>\n<\/tr>\n<tr>\n<td>129<\/td>\n<td>111<\/td>\n<td>116<\/td>\n<\/tr>\n<tr>\n<td>128<\/td>\n<td>112<\/td>\n<td>127<\/td>\n<\/tr>\n<tr>\n<td>127<\/td>\n<td>110<\/td>\n<td>123<\/td>\n<\/tr>\n<tr>\n<td>131<\/td>\n<td>115<\/td>\n<td>126<\/td>\n<\/tr>\n<tr>\n<td>128<\/td>\n<td>111<\/td>\n<td>124<\/td>\n<\/tr>\n<tr>\n<td>124<\/td>\n<td>114<\/td>\n<td>125<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"textbox shaded\">options pagesize=55 linesize=120 center date;<br \/>\ndata glm1;<br \/>\nTitle &#8216;GLM analysis of Systolic Blood Pressure Data&#8217;;<br \/>\ninput id 1-2 @4 grp sysbp;<br \/>\ndatalines;<br \/>\n134 115 125<br \/>\n152 114 126<br \/>\n161 119 128<br \/>\n139 115 122<br \/>\n149 114 126<br \/>\n158 113 117<br \/>\n167 115 113<br \/>\n151 111 116<br \/>\n148 123 114<br \/>\n144 110 115<br \/>\n124 115 129<br \/>\n122 116 116<br \/>\n121 113 118<br \/>\n129 119 112<br \/>\n129 111 116<br \/>\n128 112 127<br \/>\n127 110 123<br \/>\n131 115 126<br \/>\n128 111 124<br \/>\n124 114 125<br \/>\n;<br \/>\nproc sort data=glm1; by id;<br \/>\nproc glm;<br \/>\nclass grp; model sysbp = grp;<br \/>\nrun;<\/div>\n<p>The output from this SAS Program is explained below.<\/p>\n<p><strong>GLM analysis of Systolic Blood Pressure Data using Systolic Blood Pressure (SYSBP) as the <\/strong><strong>Dependent Variable<\/strong><\/p>\n<div style=\"margin: auto;\">\n<table>\n<thead>\n<tr>\n<td><strong>Source<\/strong><\/td>\n<td><strong>DF<\/strong><\/td>\n<td><strong>Sum of Squares<\/strong><\/td>\n<td><strong>Mean Square<\/strong><\/td>\n<td><strong>F Value<\/strong><\/td>\n<td><strong>Pr\u00a0&gt;\u00a0F<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Model<\/strong><\/td>\n<td>2<\/td>\n<td>6169.23333<\/td>\n<td>3084.61667<\/td>\n<td>37.57<\/td>\n<td>&lt;.0001<\/td>\n<\/tr>\n<tr>\n<td><strong>Error<\/strong><\/td>\n<td>57<\/td>\n<td>4679.75000<\/td>\n<td>82.10088<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><strong>Corrected Total<\/strong><\/td>\n<td>59<\/td>\n<td>10848.98333<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div style=\"margin: auto;\">\n<table>\n<thead>\n<tr>\n<td><strong>R-Square<\/strong><\/td>\n<td><strong>Coeff Var<\/strong><\/td>\n<td><strong>Root MSE<\/strong><\/td>\n<td><strong>sysbp\u00a0Mean<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>0.568646<\/td>\n<td>7.278849<\/td>\n<td>9.060953<\/td>\n<td>124.4833<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div style=\"margin: auto;\">\n<table>\n<thead>\n<tr>\n<td><strong>Source<\/strong><\/td>\n<td><strong>DF<\/strong><\/td>\n<td><strong>Type I SS<\/strong><\/td>\n<td><strong>Mean Square<\/strong><\/td>\n<td><strong>F Value<\/strong><\/td>\n<td><strong>Pr\u00a0&gt;\u00a0F<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>grp<\/strong><\/td>\n<td>2<\/td>\n<td>6169.233333<\/td>\n<td>3084.616667<\/td>\n<td>37.57<\/td>\n<td>&lt;.0001<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div style=\"margin: auto;\">\n<table>\n<thead>\n<tr>\n<td><strong>Source<\/strong><\/td>\n<td><strong>DF<\/strong><\/td>\n<td><strong>Type III SS<\/strong><\/td>\n<td><strong>Mean Square<\/strong><\/td>\n<td><strong>F Value<\/strong><\/td>\n<td><strong>Pr\u00a0&gt;\u00a0F<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>grp<\/strong><\/td>\n<td>2<\/td>\n<td>6169.233333<\/td>\n<td>3084.616667<\/td>\n<td>37.57<\/td>\n<td>&lt;.0001<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>The comparison of means across groups was analyzed using the SAS code <strong>lsmeans grp\/ adjust= scheffe;\u00a0 <\/strong>as shown here.<br \/>\n<strong>GLM analysis of Systolic Blood Pressure Data<\/strong><br \/>\n<strong>The GLM Procedure using <\/strong><strong>Least Squares Means <\/strong><strong>Adjustment for Multiple Comparisons: Scheffe<\/strong><\/p>\n<div style=\"margin: auto;\">\n<table>\n<thead>\n<tr>\n<td><strong>grp<\/strong><\/td>\n<td><strong>sysbp LSMEAN<\/strong><\/td>\n<td><strong>LSMEAN Number<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>1<\/strong><\/td>\n<td>138.300000<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td><strong>2<\/strong><\/td>\n<td>114.250000<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td><strong>3<\/strong><\/td>\n<td>120.900000<\/td>\n<td>3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div style=\"margin: auto;\">\n<table class=\"aligncenter\" style=\"width: 514px;height: 120px\">\n<thead>\n<tr class=\"shaded\" style=\"height: 60px\">\n<td colspan=\"4\"><strong><strong>Least Squares Means for effect grp<br \/>\nPr &gt; |t| for H0: LSMean(i)=LSMean(j)<\/strong><\/strong>Dependent Variable: sysbp<\/td>\n<\/tr>\n<tr style=\"height: 15px\">\n<td style=\"width: 249.45px;height: 15px\"><strong>i\/j<\/strong><\/td>\n<td style=\"width: 71.85px;height: 15px\"><strong>1<\/strong><\/td>\n<td style=\"width: 78.25px;height: 15px\"><strong>2<\/strong><\/td>\n<td style=\"width: 61.45px;height: 15px\"><strong>3<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 15px\">\n<td style=\"width: 249.45px;height: 15px\"><strong>1<\/strong><\/td>\n<td style=\"width: 71.85px;height: 15px\"><\/td>\n<td style=\"width: 78.25px;height: 15px\">&lt;.0001<\/td>\n<td style=\"width: 61.45px;height: 15px\">&lt;.0001<\/td>\n<\/tr>\n<tr style=\"height: 15px\">\n<td style=\"width: 249.45px;height: 15px\"><strong>2<\/strong><\/td>\n<td style=\"width: 71.85px;height: 15px\">&lt;.0001<\/td>\n<td style=\"width: 78.25px;height: 15px\"><\/td>\n<td style=\"width: 61.45px;height: 15px\">0.0763<\/td>\n<\/tr>\n<tr style=\"height: 15px\">\n<td style=\"width: 249.45px;height: 15px\"><strong>3<\/strong><\/td>\n<td style=\"width: 71.85px;height: 15px\">&lt;.0001<\/td>\n<td style=\"width: 78.25px;height: 15px\">0.0763<\/td>\n<td style=\"width: 61.45px;height: 15px\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><strong>means grp \/hovtest welch tukey scheffe;<\/strong><\/p>\n<p><strong>GLM analysis of Systolic Blood Pressure Data- Main Effects Analysis<\/strong><\/p>\n<div style=\"margin: auto;\">\n<table>\n<thead>\n<tr>\n<td colspan=\"6\"><strong>Levene&#8217;s Test for Homogeneity of sysbp Variance<br \/>\nANOVA of Squared Deviations from Group Means<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>Source<\/strong><\/td>\n<td><strong>DF<\/strong><\/td>\n<td><strong>Sum of Squares<\/strong><\/td>\n<td><strong>Mean Square<\/strong><\/td>\n<td><strong>F Value<\/strong><\/td>\n<td><strong>Pr\u00a0&gt;\u00a0F<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>grp<\/strong><\/td>\n<td>2<\/td>\n<td>406309<\/td>\n<td>203155<\/td>\n<td>15.59<\/td>\n<td>&lt;.0001<\/td>\n<\/tr>\n<tr>\n<td><strong>Error<\/strong><\/td>\n<td>57<\/td>\n<td>742833<\/td>\n<td>13032.2<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div style=\"margin: auto;\">\n<table>\n<thead>\n<tr>\n<td><strong>Welch&#8217;s ANOVA for sysbp<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>Source<\/strong><\/td>\n<td><strong>DF<\/strong><\/td>\n<td><strong>F Value<\/strong><\/td>\n<td><strong>Pr\u00a0&gt;\u00a0F<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>grp<\/strong><\/td>\n<td>2.0000<\/td>\n<td>33.35<\/td>\n<td>&lt;.0001<\/td>\n<\/tr>\n<tr>\n<td><strong>Error<\/strong><\/td>\n<td>32.1316<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><strong>\u00a0<\/strong><strong>GLM analysis of Systolic Blood Pressure Data with the Post Hoc <\/strong><strong style=\"text-align: initial;font-size: 1em\">t Tests (LSD) for sysbp<\/strong><\/p>\n<p><strong>Note: <\/strong>This test controls the Type I comparison wise error rate, not the experiment wise error rate.<\/p>\n<div style=\"margin: auto;\">\n<table>\n<tbody>\n<tr>\n<td><strong>Alpha<\/strong><\/td>\n<td>0.05<\/td>\n<\/tr>\n<tr>\n<td><strong>Error Degrees of Freedom<\/strong><\/td>\n<td>57<\/td>\n<\/tr>\n<tr>\n<td><strong>Error Mean Square<\/strong><\/td>\n<td>82.10088<\/td>\n<\/tr>\n<tr>\n<td><strong>Critical Value of t<\/strong><\/td>\n<td>2.00247<\/td>\n<\/tr>\n<tr>\n<td><strong>Least Significant Difference<\/strong><\/td>\n<td>5.7377<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div style=\"margin: auto;\">\n<table>\n<thead>\n<tr>\n<td colspan=\"4\"><strong>Means with the same letter are not significantly different.<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>t\u00a0Grouping<\/strong><\/td>\n<td><strong>Mean<\/strong><\/td>\n<td><strong>N<\/strong><\/td>\n<td><strong>grp<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>A<\/td>\n<td>138.300<\/td>\n<td>20<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>B<\/td>\n<td>120.900<\/td>\n<td>20<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>C<\/td>\n<td>114.250<\/td>\n<td>20<\/td>\n<td>2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><strong>\u00a0<\/strong><strong>GLM analysis of Systolic Blood Pressure Data with the <\/strong><strong style=\"text-align: initial;font-size: 1em\">Tukey&#8217;s Studentized Range (HSD) Test for sysbp<\/strong><\/p>\n<p><strong>\u00a0<\/strong><strong>Note: <\/strong>This test controls the Type I experiment-wise error rate, but it generally has a higher Type II error rate than REGWQ.<\/p>\n<div style=\"margin: auto;\">\n<table>\n<tbody>\n<tr>\n<td><strong>Alpha<\/strong><\/td>\n<td>0.05<\/td>\n<\/tr>\n<tr>\n<td><strong>Error Degrees of Freedom<\/strong><\/td>\n<td>57<\/td>\n<\/tr>\n<tr>\n<td><strong>Error Mean Square<\/strong><\/td>\n<td>82.10088<\/td>\n<\/tr>\n<tr>\n<td><strong>Critical Value of Studentized Range<\/strong><\/td>\n<td>3.40311<\/td>\n<\/tr>\n<tr>\n<td><strong>Minimum Significant Difference<\/strong><\/td>\n<td>6.895<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div style=\"margin: auto;\">\n<table>\n<thead>\n<tr>\n<td colspan=\"4\"><strong>Means with the same letter are not significantly different.<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>Tukey\u00a0Grouping<\/strong><\/td>\n<td><strong>Mean<\/strong><\/td>\n<td><strong>N<\/strong><\/td>\n<td><strong>grp<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>A<\/td>\n<td>138.300<\/td>\n<td>20<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>B<\/td>\n<td>120.900<\/td>\n<td>20<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>B<\/td>\n<td>114.250<\/td>\n<td>20<\/td>\n<td>2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><strong>GLM analysis of Systolic Blood Pressure Data with the\u00a0<\/strong><strong>Scheffe&#8217;s Test for sysbp<\/strong><\/p>\n<p><strong>Note: <\/strong>This test controls the Type I experiment-wise error rate.<\/p>\n<div style=\"margin: auto;\">\n<table>\n<tbody>\n<tr>\n<td><strong>Alpha<\/strong><\/td>\n<td>0.05<\/td>\n<\/tr>\n<tr>\n<td><strong>Error Degrees of Freedom<\/strong><\/td>\n<td>57<\/td>\n<\/tr>\n<tr>\n<td><strong>Error Mean Square<\/strong><\/td>\n<td>82.10088<\/td>\n<\/tr>\n<tr>\n<td><strong>Critical Value of F<\/strong><\/td>\n<td>3.15884<\/td>\n<\/tr>\n<tr>\n<td><strong>Minimum Significant Difference<\/strong><\/td>\n<td>7.202<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div style=\"margin: auto;\">\n<table>\n<thead>\n<tr>\n<td colspan=\"4\"><strong>Means with the same letter are not significantly different.<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>Scheffe\u00a0Grouping<\/strong><\/td>\n<td><strong>Mean<\/strong><\/td>\n<td><strong>N<\/strong><\/td>\n<td><strong>grp<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>A<\/td>\n<td>138.300<\/td>\n<td>20<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>B<\/td>\n<td>120.900<\/td>\n<td>20<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>B<\/td>\n<td>114.250<\/td>\n<td>20<\/td>\n<td>2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>If we rerun the analysis with the class statement removed we can generate the coefficients for the independent variables.<\/p>\n<p><strong>proc glm ;<br \/>\nmodel sysbp = grp;<\/strong><\/p>\n<div style=\"margin: auto;\">\n<table>\n<thead>\n<tr>\n<td><strong>Parameter<\/strong><\/td>\n<td><strong>Estimate<\/strong><\/td>\n<td><strong>Standard<br \/>\nError<\/strong><\/td>\n<td><strong>t\u00a0Value<\/strong><\/td>\n<td><strong>Pr\u00a0&gt;\u00a0|t|<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Intercept<\/strong><\/td>\n<td>141.8833333<\/td>\n<td>3.96644269<\/td>\n<td>35.77<\/td>\n<td>&lt;.0001<\/td>\n<\/tr>\n<tr>\n<td><strong>grp<\/strong><\/td>\n<td>-8.7000000<\/td>\n<td>1.83610618<\/td>\n<td>-4.74<\/td>\n<td>&lt;.0001<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><strong>\u00a0<\/strong><strong>Adding A Second Grouping Factor To a GLM Model<\/strong><\/p>\n<p>Consider the analysis we used in the PROC ANOVA computations used in Chapter 9, where we were interested in evaluating the effects of a one-hour activity break into the workday, believing that such an opportunity could reduce the resting heart rates of the participants and thereby lead to a healthier workforce.<\/p>\n<p>You will recall that the research design began with 66 participants that were randomly selected from a sample of employees within the company, and randomly allocated to one of three treatment groups.\u00a0 In the following analysis, we used PROC GLM and the post hoc procedure LSMEANS\u00a0 to evaluate the cell-wise interaction component to evaluate the individual cell means between the treatment levels (walking versus dancing versus book reading), for each level of sex (males versus females).<\/p>\n<p><strong>PROC glm data=anova2x3;<br \/>\ntitle &#8216;Using PROCGLM to determine interaction effect &#8216;;<br \/>\nclass sex group ;<br \/>\nmodel hrchange =sex group sex*group;<br \/>\nlsmeans sex*group\/ diff;<br \/>\nrun;<\/strong><\/p>\n<p>The results from the LSMEANS analysis are shown here Using PROC GLM to determine interaction effect<\/p>\n<p><strong>The GLM Procedure:\u00a0<\/strong><strong>Least Squares Means<\/strong><\/p>\n<div style=\"margin: auto;\">\n<table>\n<thead>\n<tr>\n<td><strong>sex<\/strong><\/td>\n<td><strong>group<\/strong><\/td>\n<td><strong>hrchange LSMEAN<\/strong><\/td>\n<td><strong>LSMEAN Number<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>F<\/strong><\/td>\n<td><strong>1<\/strong><\/td>\n<td>-4.5454545<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td><strong>F<\/strong><\/td>\n<td><strong>2<\/strong><\/td>\n<td>-10.3181818<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td><strong>F<\/strong><\/td>\n<td><strong>3<\/strong><\/td>\n<td>5.8181818<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td><strong>M<\/strong><\/td>\n<td><strong>1<\/strong><\/td>\n<td>-4.2727273<\/td>\n<td>4<\/td>\n<\/tr>\n<tr>\n<td><strong>M<\/strong><\/td>\n<td><strong>2<\/strong><\/td>\n<td>-2.0000000<\/td>\n<td>5<\/td>\n<\/tr>\n<tr>\n<td><strong>M<\/strong><\/td>\n<td><strong>3<\/strong><\/td>\n<td>6.5454545<\/td>\n<td>6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div style=\"margin: auto;\">\n<table>\n<thead>\n<tr>\n<td colspan=\"7\"><strong><strong>Least Squares Means for effect sex*group<br \/>\nPr &gt; |t| for H0: LSMean(i)=LSMean(j)<\/strong><\/strong>Dependent Variable: hrchange<\/td>\n<\/tr>\n<tr>\n<td><strong>i\/j<\/strong><\/td>\n<td><strong>1<\/strong><\/td>\n<td><strong>2<\/strong><\/td>\n<td><strong>3<\/strong><\/td>\n<td><strong>4<\/strong><\/td>\n<td><strong>5<\/strong><\/td>\n<td><strong>6<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>1<\/strong><\/td>\n<td><\/td>\n<td>&lt;.0001<\/td>\n<td>&lt;.0001<\/td>\n<td>0.8183<\/td>\n<td>0.0336<\/td>\n<td>&lt;.0001<\/td>\n<\/tr>\n<tr>\n<td><strong>2<\/strong><\/td>\n<td>&lt;.0001<\/td>\n<td><\/td>\n<td>&lt;.0001<\/td>\n<td>&lt;.0001<\/td>\n<td>&lt;.0001<\/td>\n<td>&lt;.0001<\/td>\n<\/tr>\n<tr>\n<td><strong>3<\/strong><\/td>\n<td>&lt;.0001<\/td>\n<td>&lt;.0001<\/td>\n<td><\/td>\n<td>&lt;.0001<\/td>\n<td>&lt;.0001<\/td>\n<td>0.5404<\/td>\n<\/tr>\n<tr>\n<td><strong>4<\/strong><\/td>\n<td><span style=\"background-color: #ff0000\">0.8183<\/span><\/td>\n<td>&lt;.0001<\/td>\n<td>&lt;.0001<\/td>\n<td><\/td>\n<td>0.0573<\/td>\n<td>&lt;.0001<\/td>\n<\/tr>\n<tr>\n<td><strong>5<\/strong><\/td>\n<td>0.0336<\/td>\n<td>&lt;.0001<\/td>\n<td>&lt;.0001<\/td>\n<td><span style=\"background-color: #ff0000\">0.0573<\/span><\/td>\n<td><\/td>\n<td>&lt;.0001<\/td>\n<\/tr>\n<tr>\n<td><strong>6<\/strong><\/td>\n<td>&lt;.0001<\/td>\n<td>&lt;.0001<\/td>\n<td><span style=\"background-color: #ff0000\">0.5404<\/span><\/td>\n<td>&lt;.0001<\/td>\n<td>&lt;.0001<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Notice the matrix indicates the probability level at which the pairwise comparisons between cell means are different. Sine most comparisons were significantly different, only the comparisons that showed a probability level of p &gt;0.05, are highlighted in red. These results support the notion that being physically active, whether it be dancing or walking as planned exercise, has a positive effect on reducing resting heart rates, and more so for females than males.<\/p>\n","protected":false},"author":56,"menu_order":6,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-1055","chapter","type-chapter","status-publish","hentry"],"part":401,"_links":{"self":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapters\/1055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/wp\/v2\/users\/56"}],"version-history":[{"count":14,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapters\/1055\/revisions"}],"predecessor-version":[{"id":2086,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapters\/1055\/revisions\/2086"}],"part":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/parts\/401"}],"metadata":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapters\/1055\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/wp\/v2\/media?parent=1055"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapter-type?post=1055"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/wp\/v2\/contributor?post=1055"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/wp\/v2\/license?post=1055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}