Question: Open the wcgs.dta data in Stata. Using the following command to fit a regression model to the data: regress sbp age chol i.behpat. Here, sbp
- Open the wcgs.dta data in Stata. Using the following command to fit a regression model to the data: regress sbp age chol i.behpat. Here, sbp denotes systolic blood pressure, age denotes the age of an individual, chol denotes cholesterol level, and i.behpat denotes behavioral pattern categorized into 4 categories a.Show the Stata output
- b.Write out the proposed model that is fit to the data. Write out the predicted model. What is the predicted sbp for a person with cholesterol level of 226, age 45, and behavior pattern A2, based on the predicted model? Verify your answer by calculating the predicted sbp using the following command: margins, at(age=45 chol=226 behpat=2).
- c. Write out the null hypothesis and the alternative hypothesis that are being tested by the F test shown at the upper right panel of the output. Explain your conclusion.
- d. Using the command testparm i.behpat to perform a test of the overall effect of behavioral pattern. Show your result. Write out the null hypothesis and the alternative hypothesis that are being tested. Explain your conclusion.
- e. Extract the fitted values from the linear regression model using the command predict yhat, xb. Obtain the sample correlation between the fitted values yhat and the outcome variable sbp and verify that the squared sample correlation between the fitted values and the outcome variable is equal to R2 obtained in the multiple linear regression model.
- 2. Fit a multiple linear regression model for cholesterol using the predictor variables smoke, bmi_cat, age, and the interaction of age and smoke. Describe in words the effect of age on cholesterol from this model.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
