# Advanced Concepts for Multi-Level Categorical Predictors and Additional Examples

**NOTE:** Except in cases of complex calculations, we use brackets [ ] to indicate “functions of” and parentheses ( ) to indicate “multiplication.”

**SE[Beta_1-hat]** = the standard error of the estimated slope Beta_1-hat. There is no multiplication!

**Beta_1-hat(AGE)** = the multiplication of estimated slope Beta_1-hat and the variable AGE.

- Introduction and Links to Materials
- PROC GLM
- PHC 6053 Videos (28:14)
- Examples and Learn by Doing Activities
**LEARN BY DOING:**Working With Models – Part 2

## Introduction and Links to Materials

In Unit 3 we will spend a significant amount of time covering the details regarding** multiple linear regression.** Many of the basic ideas are direct extensions of simple linear regression and many skills in interpretation and modeling will translate, at least partially, to other regression models we will cover and that you may learn in the future.

We will be using **PROC GLM** instead of PROC REG in this course although many analyses can be completed using PROC REG if you are willing to code all categorical variables manually. We will learn in this unit how PROC GLM can be used to correctly code categorical variables for us in our analyses which is the main reason we prefer PROC GLM for multiple linear regression in this course.

Useful **SAS Procedures**

- PROC GLM
- CLASS statement in PROC GLM
- CONTRAST, ESTIMATE, and TEST statements in PROC GLM
- Other procedures as needed for exploratory data analysis

## PROC GLM

We will be using PROC GLM for simple and multiple linear regression so let’s look at some PROC GLM documentation including examples.

**SAS Documentation: **Here are links to documentation about GLM including common statements.

- PROC GLM – CONTRAST statement options (for testing effects/comparisons not immediately available in parameter estimates table)
- PROC GLM – ESTIMATE statement options (for estimating effects/comparisons not immediately available in parameter estimates table)
- PROC GLM – TEST statement options (for testing effects/comparisons not immediately available in parameter estimates table)
- PROC GLM – CLASS statement options (used to specific CATEGORICAL PREDICTORS in our model and the REFERENCE GROUPS)
- PROC GLM Syntax (Notice how many commands PROC GLM has and investigate commands as you learn them by clicking on their links here).
- PROC GLM – MODEL statement options (review this carefully regarding what option do – investigate common options by looking into the details!!)

## PHC 6053 Videos (28:14)

## Advanced Concepts for Multi-Level Categorical Predictors (12:52)

View Lecture Slides with Transcript

## Additional Example for Multi-Level Categorical Predictors (10:32)

View Lecture Slides with Transcript

## Video – From Live Lecture on Interactions (4:50)

- Covers Slides 1-8 in thes FULL Lecture Slides. Not all lecture slides are covered in the videos you will see, we kept only the best parts but left the original slides as extra examples and so that the slide numbers would match the live recorded videos.
- Here is the SAS CODE (SAS OUTPUT) for this original lecture. Not all examples are provided in this SAS code, particularly the results which are displayed from other software package.

## Examples and Learn by Doing Activities

Now let’s look at some exercises on working with models.

## EXAMPLE: Working With Models – Part 2

In this activity we will look at multiple linear regression and multi-level predictors.

**Worksheet:**Unit3-03-01-WorkingWithModels-Part2.pdf**Solutions:**Unit3-03-01-WorkingWithModels-Part2-Solution.pdf