Question: I need help with #4... the SAS codes that I am trying to run, I keep getting an error message: ERROR: Variable eduyears not found.

I need help with #4... the SAS codes that I am trying to run, I keep getting an error message: ERROR: Variable eduyears not found. NOTE: The SAS System stopped processing this step because of errors. 233 PROC LOGISTIC DATA=hw5.mus14data; 234 MODEL ins = retire age hstatusg hhincome eduyears married hisp / LINK=LOGIT; 235 RUN;

NOTE: PROCEDURE LOGISTIC used (Total process time): real time 0.00 seconds cpu time 0.00 seconds

ERROR: Variable eduyears not found. NOTE: The SAS System stopped processing this step because of errors. 236 PROC LOGISTIC DATA=hw5.mus14data; 237 MODEL ins(event='1') = retire age hstatusg hhincome eduyears married hisp; 238 RUN;

/* 4. Full model */ PROC LOGISTIC DATA=hw5.mus14data; MODEL ins = retire age hstatusg hhincome eduyears married hisp / LINK=LOGIT; RUN; PROC LOGISTIC DATA=hw5.mus14data; MODEL ins(event='1') = retire age hstatusg hhincome eduyears married hisp; RUN;

Directions: Use either SAS to answer the following questions. Include the code, plots, and comments under each question, then submit the completed document on Canvas.

The data used in this homework are from wave 5 of the Health and Retirement Study (HRS), a survey conducted in 2002 as part of a panel sponsored by NIH. The sample consists of Medicare beneficiaries and the question of interest is whether or not they purchase supplemental insurance (ins). The explanatory variables include socio-economic and demographic factors and an indicator of health status.

The data are located with the assignment on Canvas in the file mus14data.csv.

Libname hw5"C:\Users\jkare\OneDrive\Documents\homework5";

Logistic Regression

  1. a. What is the proportion of respondents who have supplemental insurance? (3 pts)

b. What are the odds of having insurance? (3 pts)

c. What is the logit? (3 pts)

2. a. Fit a null model and obtain the 95% confidence interval for the logit and interpret it. (5 pts)

b. Translate the confidence interval to the odds scale and interpret it. (5 pts)

c. Translate the confidence interval to the probability scale and interpret it. (5 pts)

3. a. Let's examine whether Hispanics are less likely to have supplemental insurance than others. Fit a model in whichins is the outcome andhisp is the predictor. Compare the full and null models using the global likelihood ratio test. (5 pts)

b. Estimate and test the significance of the odds ratio using a Wald test or a likelihood ratio test. (5 pts)

c. Interpret the odds ratio. (3 pts)

4. a. Fit a logistic regression model using retirement status (retire), age (age), health status (hstatusg, coded 1 for good, very good or excellent and 0 otherwise), household income (hhincome), education in years (eduyears), the indicator for married (married), and the indicator of hispanic ethnicity (hisp) as predictors andins as the outcome. Which predictors have statistically significant coefficients? (5 pts)

b. Interpret the odds ratio for hispanics, comparing it with the result of question 3. Test the significance of the hispanic ethnicity effect using a Wald test or a likelihood ratio test. (5 pts)

c. Compute pseudo-R2. (3 pts)

5. a. Continuing with the same model as in question 4, examine whether there are any outliers. (5 pts)

b. Examine whether there are influential observations by plotting the DFBETAS. (5 pts)

c. What do you conclude with regard to outliers or influential observations. (5 pts)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!