首页 > > 详细

辅导R、R调试、辅导R、R编程解析、解析Multiple Regression in R

Lab 1: Multiple Regression in R (Review)


Name:
PSU ID (xyz123):

To run this code in R you should install the packages ISwR and car.

This lab explores the data set “cystfibr”, and examines relationships between “pemax” and other
characteristics of individuals with cystic fibrosis.

0.) Preliminaries: What do we know about the data?

1.) Exploratory Data Analysis

A. What summaries might be useful to know?


B. Do we have any missing data?

C. Create a matrix scatterplot (pairs()), OR individual scatter plots, of each variable
versus the others. Include only 1 scatterplot or figure of your choice here in the
homework. Provide appropriate axis labels and a caption for the figure. The caption
should indicate what useful observations can be made from the figure.



2.) Preliminary Analysis

Fit a linear model with “pemax” as the response and all other variables as explanatory variables.
A. List the assumptions of this model.
B. Interpret the coefficient for Age.
C. Interpret the p-value for Age.
D. Interpret the coefficient for Sex.
E. Having looked at the relationships illustrated in the matrix scatter plot, does it surprise
you that none of the explanatory variables are statistically significant? Why or why not?
F. Calculate the Variance Inflation Factor (VIF). How might you use this information
moving forward?


3.) Model Building

A. Fit a linear model that includes an interaction term for age and sex. Provide an
interpretation of this coefficient.

B. Build a final model based on any reasonable criteria. Report your model. State the
criteria clearly, and why it would lead to a reasonable model.


If you completed this lab in R, please paste your code at the end of the file.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!