# [[EDUC 7215]] Assignment 9
Jethro Jones
Also available online at [drjethro.com](https://drjethro.com/7215ass9)
## Assignment
Instructions
1. Analyze PEB_Donate as a linear function of NEP, PN, and Race.
2. Answer Research Question using binary logistic regression analysis.
3. PEB_Donate Yes=5, No=1
4. NEP & PN are continuous variables
5. Race is Classification (3=Black and 5=White)
6. Model YES=5 as the event of interest
7. Logit link function, reference coding for parameterization of effects
8. Race=3 as reference level for race
9. Hypothesis tests
1. H<sub>0</sub>: PEB_Donate is not related to NEP, PN, and Race
2. H<sub>1</sub>: PEB_Donate is a linear function of NEP, PN, and Race
10. Type 1 Error rate of 0.05 or 5%
11. no need to test for assumptions of variance.
12. Methods Paragraph
13. Descriptive Stats
14. Further hypotheses:
| | | | |
| ----------------------------- | ------------------------------- | ------------------------------ | -------------------------------- |
| H<sub>0</sub>: Intercept = 0 | H<sub>0</sub>: Slope of NEP = 0 | H<sub>0</sub>: Slope of PN = 0 | H<sub>0</sub>: Slope of Race = 0 |
| H<sub>a</sub>: Intercept ≠ 0 | H<sub>a</sub>: Slope of NEP ≠ 0 | H<sub>a</sub>: Slope of PN ≠ 0 | H<sub>a</sub>: Slope of Race ≠ 0 |
### Research Question
Is a person’s willingness to donate to an environmental organization a linear function of NEP, PN, and Race for survey respondents in the Missouri area?
H<sub>0</sub>: PEB_Donate is not related to NEP, PN, and Race
H<sub>1</sub>: PEB_Donate is a linear function of NEP, PN, and Race
Type 1 Error Rate: 0.05 or 5%
### Methods
I used Tasks and Utilities -> Tasks -> Linear Models -> Binary Logistic Regression. I selected the Donation dataset from the WORK library. Under the Response Variable Box, I selected PEB_Donate, chose Event of Interest as 5, and chose Link Function as Logit. Under the Classification Variables, I selected Race. For the Parameterization of Effects, I chose Reference Coding. Under the Continuous Variables, I selected NEP and PN. I added the filter:
```
(PEB_Donate=1 or PEB_Donate=5) and (Race=3 or Race=5)
```
Under the Model tab, I selected the Main Effects Model. For the model, assign Race=3 as the reference level for race, I modified the code by adding (ref=’3’) to the Class statement after Race. After I clicked the Run icon, I took a screenshot of each individual table and renamed each file using a AI renaming tool.
![[7215 ass9 2025-04-15 LogisticRegressionSASCode.png]]
![[7215 ass9 2025-04-15_SAS_Studio_Interface.png]]
![[7215 ass9 2025-04-15_SAS_Studio_Code_Editor.png]]
### Summary Statistics
This table shows that I have set this up correctly, using PEB_Donate as the response variable, with the correct data set, and using a binary logit model, with a Fisher's scoring optimization technique.
![[7215 ass9 2025-04-15_ModelInformation.png]]
This table shows there were 322 observations read and used.
![[7215 ass9 2025-04-15_NumberOfObservations.png]]
This shows that there were 322 responses (227 = no donation, 95 = yes donation)
![[7215 ass9 2025-04-15 ResponseProfileTable.png]]
The class level shows that the class ref=3 we used in the coding did in fact work as expected.
![[7215 ass9 2025-04-15 Class Level Information Table.png]]
This shows us that convergence criterion was satisfied. If this were not satisfied, we would need to modify our model.
![[7215 ass9 2025-04-15 Model Convergence Status.png]]
The following table is the Model Fit Statistics. We're only interested in AIC and SC, where lower values are better. AIC and SC are useful mostly if we are comparing different models, because the model with the lower number is the best fit model. We're not concerned with the -2 Log L value. Since the intercept and covariates number is lower that shows that the model was improved by including NEP, PN and Race.
![[7215 ass9 2025-04-15_Model_Fit_Statistics.png]]
The results of the following three tests show that p <.0001, indicating that NEP, PN and Race are statistically significant predictors of PEB_Donate, and at least one has a meaningful relationship with the likelihood of donating.
![[7215 ass9 2025-04-15 Testing Global Null Hypothesis BETA 0.png]]
This table shows that Race and PN are not statistically significant because for Race P=.0446 which means p<0.05 and for PN p<.0001 which means p<.05. However for NEP p=.2653 which means p>0.05.
Let's look at our hypotheses:
| | | | |
| ----------------------------- | ------------------------------- | ------------------------------ | -------------------------------- |
| H<sub>0</sub>: Intercept = 0 | H<sub>0</sub>: Slope of NEP = 0 | H<sub>0</sub>: Slope of PN = 0 | H<sub>0</sub>: Slope of Race = 0 |
| H<sub>a</sub>: Intercept ≠ 0 | H<sub>a</sub>: Slope of NEP ≠ 0 | H<sub>a</sub>: Slope of PN ≠ 0 | H<sub>a</sub>: Slope of Race ≠ 0 |
Since the p-value is **less than 0.05**, we **reject** the null hypothesis (**H₀: Slope of Race = 0**) and **accept** the alternative hypothesis (**Hₐ: Slope of Race ≠ 0**). This means **Race** significantly affects the likelihood of donating.
Since the p-value is **greater than 0.05**, we **fail to reject** the null hypothesis (**H₀: Slope of NEP = 0**) and conclude that **NEP** does not have a significant effect on donation behavior.
Since the p-value is **much smaller than 0.05**, we **reject** the null hypothesis (**H₀: Slope of PN = 0**) and **accept** the alternative hypothesis (**Hₐ: Slope of PN ≠ 0**). This means **PN** significantly affects the likelihood of donating.
![[7215 ass9 2025-04-15 Type 3 Analysis of Effects Table.png]]
The next table is the analysis of maximum likelihood estimates, which shows how each variable contributes to the likelihood of donating to the environmental organization.
- **Race** is significant (p = 0.0446), suggesting it has an effect on the likelihood of donation.
- **NEP** is not significant (p = 0.2653), indicating that it doesn't contribute meaningfully to predicting donation behavior.
- **PN** is highly significant (p < 0.0001), showing that personal norms strongly predict the likelihood of donation.
![[7215 ass9 2025-04-15 Analysis of Maximum Likelihood Estimates.png]]
The Odds Ratio Estimates table reaffirms earlier tables. **Race** (category 5 vs 3) and **PN** are statistically significant predictors of donation likelihood. Specifically, individuals in **race category 5** and those with higher **PN** have significantly higher odds of donating.
**NEP** is not statistically significant, as the confidence interval includes 1, suggesting that **NEP** does not have a meaningful impact on the likelihood of donation in this model.
![[7215 ass9 2025-04-15 Odds Ratio Estimates Table.png]]
The final table shows us the Concordant and Discordant Percents. The percent concordance = 72.7%, meaning it correctly predicts the higher likelihood of donation in most cases and is therefore a good predictive model.
![[7215 ass9 2025-04-15 Association of Predicted Probabilities.png]]
### Summary and conclusions
This logistic regression model provides valuable insights into the factors that determine if someone will donate to an environmental organization. PN, then Race show positive effect on donating. While NEP does not have a statistically significant effect on the likelihood of someone donating.
We reject the null hypothesis (**H₀**) and accept the alternative hypothesis (**H₁**), concluding that **PEB_Donate** is a linear function of **NEP**, **PN**, and **Race**.
## Assignment Directions
Assignment 9 (20 points)
The dataset used for this assignment (and subsequent assignments) was created from a Value-Belief-Norm (VBN) Theory-based survey designed to assess the factors that influence pro-environmental behavior in the Missouri area. For this assignment, you will focus on one of the pro-environmental behavior scale (Markle 2013) questions that asks the recipient if they have donated to an environmental organization during the past year (PEB\_Donate, yes/no). In the previous assignments about regression and correlation analysis, you analyzed NEP (New Environmental Paradigm), which is the arithmetic mean of 15 questions from the hypothesized facet scale developed by Hawcroft & Milfont (2010), and you also analyzed PN (Personal Norms), which is the arithmetic mean of 9 questions from the personal normative scale developed by Steg et al. (2005). In an earlier assignment, you also discovered that PEB is influenced by race.
Import the data (repeated from Assignment 1): The dataset is an Excel file named: “EDUC7215\_Assignment\_Dataset.xlsx”. You will find under Modules à Assignments on our Canvas page. You need to upload it into your SAS Profile Folder in the Cloud so SAS Studio can access it. There are three worksheets in the Excel workbook: Final Data, ReadMe, and Coding Description. The ReadMe and Coding Description worksheets contain details about all the variables in the dataset. The Final Data worksheet contains the data, and you need to type “Final Data” in the “Worksheet Name” box in the Import Data pane. Also, you can change the Output Data name from “Import” to whatever you choose; I chose “Behavior”. Once you click the Run icon, the dataset will be loaded into SAS Studio (these are the same steps that I described in the lecture ppt & video for Chapter 5). There are many variables in the dataset, but we will only use a few of them for this assignment. Now you are ready for data analysis!
For this assignment, I want you to analyze PEB\_Donate as a linear function of NEP, PN, and Race. You will answer the research question, “Is a person’s willingness to donate to an environmental organization a linear function of NEP, PN, and Race for survey respondents in the Missouri area?”, using binary logistic regression analysis. PEB\_Donate is a dichotomous nominal scale response variable with two possible outcomes, YES=5 or NO=1. NEP and PN are both continuous variables, and Race is a classification variable. You will need to filter the data to select only Yes & No responses for PEB\_Donate, and black & white for Race. So, use this filter: (PEB\_Donate=1 or PEB\_Donate=5) and (Race=3 or Race=5). For the model, use YES=5 as the event of interest, use the logit link function, use reference coding for the parameterization of effects, and assign Race=3 as the reference level for race (you will need to modify the SAS code to change the reference level by adding (ref='3') to the Class statement after Race). For hypothesis tests, you will need to first test the global model hypothesis:
- Ho: PEB\_Donate is not related to NEP, PN, and Race
- Ha: PEB\_Donate is a linear function of NEP, PN, and Race.
After you have completed the global hypothesis test of the model, you will test the following hypotheses to see if each model parameter estimate differs from zero. For all hypothesis tests, use the Type 1 error rate of 0.05 or 5%.
| Ho: Intercept = 0 | Ho: Slope of NEP = 0 | Ho: Slope of PN = 0 | Ho: Slope of Race = 0 |
| --- | --- | --- | --- |
| Ha: Intercept ≠ 0 | Ha: Slope of NEP ≠ 0 | Ha: Slope of PN ≠ 0 | Ha: Slope of Race ≠ 0 |
Remember that you do not need to test or visually assess any assumptions about normality or equal variances since binary logistic regression uses maximum likelihood estimation. You should also include a Methods paragraph and Descriptive Statistics for PEB\_Donate, NEP, and PN by Race.