Question: 3. On Blackboard, I've uploaded some R code via a text file (PS3_RCode.txt) and some .xlsx data (PS3_Data.xlsx). You will need to upload the PS3_Data.xlsx

3. On Blackboard, I've uploaded some R code via a text file (PS3_RCode.txt) and some .xlsx data (PS3_Data.xlsx). You will need to upload the PS3_Data.xlsx file into RStudio Cloud and open a new R script and copy/paste the provided text file into that R script but once you've done that you can run the entire code and it will give you some regression results. Here we're using National Health Interview Survey data on a health outcome (BMI>25 or overweight) and some factors that might contribute to that or not. So our regression's dependent variable is whether the person is overweight and the independent variables are age, education, natural log of income, race, gender and smoking status.

a. In the R code, I've used the following code

PS3Data$Male

Explain what I'm doing here in R... i.e. what does this code create in our R dataframe?

b. Now let's focus on our regression and interpret some of the coefficients. Interpret the coefficient

on education (PS3Data$educ: measured in years of education) in terms of magnitude and statistical significance.

c. Do the same for PS3Data$lnincome. Recall it's in natural log terms!

d. And finally interpret the coefficient for PS3Data$Male.

3. On Blackboard, I've uploaded some R code via a
File Edit Code View Plots Session Build Debug Profile Tools Help + *- Go to file/function - Addins . PS3_Data x @ Untitled1 * * PS3Data x Q Regression x Show Attributes Name Type Value Regression list [12] ($3: Im) List of length 12 coefficients double [9] 0.51991 0.00764 -0.01292 0.00518 -0.12244 0.17141 ... (Intercept) double [1] 0.5199147 PS3 Data$age double [1] 0.007639508 PS3DataSeduc double [1] -0.01292343 PS3 Data$Inincome double [1] 0.005175309 PS3 Data $Male double [1] -0.1224436 PS3 Data $BlackRace double [1] 0.1714086 PS3 Data$Hispanic... double [1] 0.1106001 PS3 Data$OtherRace double [1] -0.05268325 PS3 Data$smoker double [1] -0.01922393 residuals double [1259] 0.356 0.489 0.276 0.293 0.474 -0.642 ... effects double [1259] -24.8574 2.0148 2.0744-0.0917 1.9643 1.8447 ... rank integer [1] 9 fitted.values double [1259] 0.644 0.511 0.724 0.707 0.526 0.642 ... Regression

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!