- Parent Category: Programming Assignments' Solutions
We Helped With This R Programming Assignment: Have A Similar One?
|Subject||R | R Studio|
|More Info||Answers To Statistics Homework|
Short Assignment Requirements
Statistics 108, Homework 4
Due: November 6th, 2017, In Class (turn in paper form)
*You need to show the steps to get the full credits.
This homework is to practice on model diagnostics and data transformation. Total: 90 points.
1. (30 points) Checking model assumptions – linearity and equal variance. For the simple linear regression model, the most essential assumption is the linearity assumption. Also, the equal variance assumption is the basics for the least squares method. For seven datasets under Canvas/Files/Data files (data1.txt – data7.txt), plot the scatter plot, state whether the two assumptions hold or not and briefly explain.
2. (30 points) Understanding the Normal Q-Q plot. We use five datasets under Canvas/Files/Data files (data8.txt – data12.txt) as illustration examples to understand the Normal Q-Q plot. For each dataset, first plot the scatter plot to get an initial idea of the data. Then, fit the model and obtain the standardized residuals. Plot the histogram of the standardized residuals and comment on the shape the histogram. Plot the Normal Q-Q plot of the standardized residuals using the ‘qqnorm()’ function, and add the reference line through the ‘qqline()’ function. Comment on the Normal Q-Q plot.
3. (30 points) Data transformation. When one or more assumptions for the simple linear regression model do not hold, we may want to seek for possible transformations on X and/or Y so that the linear model is a suitable model for the transformed variables. For three datasets under Canvas/Files/Data files (data13.txt – data15.txt), first check whether the three assumptions (linearity, equal variance, and normality) hold based on the scatter plot and diagnostic plots. Then, try different transformations on X and/or Y , state the transformation you would take so that the simple linear regression model is proper on the transformed data. Draw the scatter plot of the transformed data and the diagnostic plots of the new model. Comment.