Attachment1 (5) (4)

.pdf
School
University of Michigan, Flint**We aren't endorsed by this school
Course
EGR 260
Subject
Statistics
Date
Dec 17, 2024
Pages
10
Uploaded by MajorValor14278
3 (AJasc @) Q © @ R © TueDec17 6:28PM @ Chrome File Edit View History Bookmarks Profiles Tab Window Help D 6 © 3 ¥ Students-Inc X ¥ QuizzWeek1/ X [l Search&Bro. X | & New Tab X o+ v (XX ) & ChatGPT X I Forestry Inspc X @ ChatGPT X Civil Service X ¢« > C 25 yu.instructure.com/courses/67802/quizzes/86682/take o % R2 0 Relaunch to update : Fall 2024 [0 | Question1 3 pts Home o - @ Syllabus Provide a link to where the file was downloaded. m Announcements Write a short description (3-5 sentences) about the data. People Edit View Insert Format Tools Table Zoom 12ptv Paragaph~ | B I U A v & v Tiv | i A8 = Assignments 8l Grades o = gy - ® Secure Exam Proctor (Proctorio) Lucid (Whiteboard) @ Owords | </> /I @ ® 3 (Alasc m) Q T & © TueDec17 6:28PM .' Chrome File Edit View History Bookmarks Profiles Tab Window Help v ®O®® & ChatGPT x | [l Forestrynspc X = & ChatGPT x | Bl CivilService | X = @ Students-In: X ¥ QuizzWeek1/ X [gll Search&Bro. X = & New Tab X o+ ¢« > C % yu.instructure.com/courses/67802/quizzes/86682/take & % &, @ Relaunch to update } Fall 2024 | Question 2 4 pts Home @ Syllabus Import your data into R Studio. Run str() to check that your quantitative variables are @ Announcements imported as a numeric variable (NOT char). People Zoom Edit View Insert Format Tools Table Assignments 12pt v Paragraph v B 7 U A+v £ v T2v 28 g Grades o O ® | Quizzes | Secure Exam Proctor (Proctorio) Lucid (Whiteboard) @ Owords = </> ./'
Background image
3 (AJasc @) Q © @ R © TueDec17 6:28PM @ Chrome File Edit View History Bookmarks (XX ) & ChatGPT X I Forestry Inspc X @ ChatGPT X Civil Service X Profiles Tab Window Help @ 6 © 3 ¥ Students-Inc X ¥ QuizzWeek1/ X [l Search&Bro. X | & New Tab X o+ v > ¥ 0 Relaunch to update : - S (G 25 yu.instructure.com/courses/67802/quizzes/86682/take Fall 2024 [ | Question 3 10 pts Home @ Syllabus Start by running the summary function to find the descriptive statistics for the variables. m Announcements Evaluate the data for any errors, specifically the number of missing values, outliers, and inaccurate entries. People Zoom Edit View |Insert Format Tools Table 28 = Assignments 12pt v Paragraph v B 7 U A+v v T2v Grades o = gy - ® Secure Exam Proctor (Proctorio) Lucid (Whiteboard) @ owords </> /& - @ ® 3 (Alasc m) Q T & © TueDec17 6:28PM .' Chrome File Edit View History Bookmarks Profiles Tab Window Help v ®O®® & ChatGPT x | [l Forestrynspc X = & ChatGPT x | Bl CivilService | X = @ Students-In: X ¥ QuizzWeek1/ X [gll Search&Bro. X = & New Tab X o+ ¢« > C % yu.instructure.com/courses/67802/quizzes/86682/take & % &, @ Relaunch to update } Fall 2024 i - [O | Question 4 4 pts Home EEE—— @ Syllabus Find the correlation between each of the independent and dependent variables D Announcements People S8 Zoom Edit View Insert Format Tools Table Assignments 12pt v Paragraph v B I U &Av £ v TV g Grades o \ @ |Quizzes Secure Exam Proctor ?) (Proctorio) Lucid (Whiteboard) @ Owords = </> ,Z'
Background image
3 (AJasc @) Q © @ R © TueDec17 6:28PM @ Chrome File Edit View History Bookmarks (XX ) & ChatGPT X I Forestry Inspc X @ ChatGPT X Civil Service X Profiles Tab Window Help D 6 © 3 ¥ Students-Inc X ¥ QuizzWeek1/ X [l Search&Bro. X | & New Tab X o+ v ¢« > C 25 yu.instructure.com/courses/67802/quizzes/86682/take o % R2 0 Relaunch to update : Fall 2024 " [ | Question 5 5 pts Home f @ Syllabus Create a scatterplot between each of the independent and dependent variables D Announcements Edit View Insert Format Tools Table People 12pt v Paragraph v B I U Av £ v T2+ Zoom A8 = Assignments g | Grades o = gy - ® Secure Exam Proctor (Proctorio) Lucid (Whiteboard) ® owords </> @ ® 3 (Alasc m) Q T & © TueDec17 6:28PM .' Chrome File Edit View History Bookmarks Profiles Tab Window Help ® ChatGPT x | Bl CivilService | X = @ Students-In: X ¥ QuizzWeek1/ X [gll Search&Bro. X = & New Tab X o+ v (XX ) ® ChatGPT X I Forestry Inspc X ¢« > C % yu.instructure.com/courses/67802/quizzes/86682/take & % &, @ Relaunch to update } Fall 2024 [2 | Question 6 5 pts Home | i ] @ Syllabus A L o . Create a correlation matrix with all 4 quantitative variables D Announcements People Edit View Insert Format Tools Table Zoom 12pt v Paragraph v B I U Av £ v T2v 28 Assignments g Grades o \\ @ |Quizzes ® Secure Exam Proctor (Proctorio) Lucid (Whiteboard) ® owords </> [/
Background image
@& Chrome File Edit View History Bookmarks Profiles Tab Window Help @ ® 3 (Alasc m) Q T & © TueDec17 6:28PM [ XX ) @ ChatGPT x | [l Forestry Inspc X @ ChatGPT x Bl Civil Service | X ¥ Students-Inc X ¥ QuizzWeek1/ X [l Search&Bro. X | & New Tab x + v ¢« > C % yu.instructure.com/courses/67802/quizzes/86682/take & % &, @ Relaunch to update } Fall 2024 [ | Question7 5 pts Home @ Syllabus Select the dependent variable. S Announcements | Select 3 quantitative variables and 1 binary/qualitative variable you believe will can help redict the dependent. People P P A8 Zoom Assignments 22| Edit View Insert Format Tools Table g Grades o 12pt v Paragraph v B 7 U Av £ v T2v Quizzes Secure Exam Proctor ?) (Proctorio) Lucid (Whiteboard) S p @ Owords = </> /' @& Chrome File Edit View History Bookmarks Profiles Tab Window Help @ ® 3 (Alasc m) Q T & © TueDec17 6:28PM ®O®® & ChatGPT x | [l Forestrynspc X = & ChatGPT x | Bl CivilService | X = @ Students-In: X ¥ QuizzWeek1/ X [gll Search&Bro. X = & New Tab X o+ v ¢« > C % yu.instructure.com/courses/67802/quizzes/86682/take & % &, @ Relaunch to update } Fall 2024 [0 | Question 8 5 pts Home Create a scatterplot matrix with all 4 dependent variables Syllabus Announcements Edit View Insert Format Tools Table People 12pt ~~ Paragraph v B I U A+~ £ +v 1%V Zoom Assignments Grades o |Quizzes Secure Exam Proctor (Proctorio) Lucid (Whiteboard) p @ Owords = </> f 3 [ Question 9 10 pts
Background image
@ ® 3 (Alasc m) Q T & © TueDec17 6:28PM . @ Chrome File Edit View History Bookmarks Profiles Tab Window Help B CivilService ! X = @ Students-Inc X % QuizzWeek1: x [ Search&Bro. X = & New Tab X o+ v 'K ) @ ChatGPT x | [l Forestrynspc X = & ChatGPT X ¢« > C % yu.instructure.com/courses/67802/quizzes/86682/take & % &, @ Relaunch to update } == : . @ Fall 2024 [ | Question 9 10t Home @ Syllabus | Model 1: D Announcements Select 2 variables and create a new variable, model1, using the Im() function Now, use the summary() and anova() function for three regression models. People Zoom && Submit the output of the Im() and anova() function for the first model. = Assignments Grades (6] | Then answer the following questions. |Quizzes What is the regression equation? Which variables are statistically significant? Secure Exam Proctor Proctorio ( ) What are the R squared and Adjusted R Squared values? Lucid (Whiteboard) | What is the F Statistic and the RSE? Based on the information in the output, is this a good model? Why or why not? Edit View Insert Format Tools Table 12pt ~ Paragraph B I Q A e I < ) < @ ® 3 (Alasc m) Q T & © TueDec17 6:28PM .' Chrome File Edit View History Bookmarks Profiles Tab Window Help ®O®® & ChatGPT x | [l Forestrynspc X = & ChatGPT x | Bl CivilService | X = @ Students-In: X ¥ QuizzWeek1/ X [gll Search&Bro. X = & New Tab X o+ v ¢« > C % yu.instructure.com/courses/67802/quizzes/86682/take & % &, @ Relaunch to update } % Fall 2024 [0 | Question 10 10 pts - Home e . @ Syllabus Model 2: (%) Announcements Create a new variable, model2, using the Im() function with all 3 variables. People Now, use the summary() and anova() function for three regression models. Zoom Submit the output of the Im() and anova() function for the first model. Assignments |Quizzes What is the regression equation? Secure Exam Proctor What is the regression equation? (Proctorio) 28 : g Grades 0 Then answer the following questions. Which variables are statistically significant? Lucid (Whiteboard) What are the R squared and Adjusted R Squared values? What is the F Statistic and the RSE? Based on the information in the output, is this a good model? Why or why not? Edit View Insert Format Tools Table Is < T2 v 12pt v Paragraph v B I Q fi e
Background image
i @D ©® % (Aasc @) Q @ S © TueDec17 6:28PM @ Chrome File Edit View History Bookmarks Profiles Tab Window Help B CivilService ! X = @ Students-Inc X % QuizzWeek1: x [ Search&Bro. X = & New Tab (XX ) ® ChatGPT X I Forestry Inspc X @ ChatGPT X X + v ¢« > C % yu.instructure.com/courses/67802/quizzes/86682/take & % &, @ Relaunch to update } == @ Fall 2024 [ | Question 11 10 pts - Home B ] @ Syllabus Model 3: (%) Announcements create a new model, model3, with the 3 quantitative variables and the qualitative variable. People Now, use the summary() and anova() function for three regression models. Zoom Submit the output of the Im() and anova() function for the first model. 28 = Assignments |Quizzes i i . What is the regression equation? Secure Exam Proctor . . - - 5 (Proctorio) Which variables are statistically significant? Grades o | Then answer the following questions. What are the R squared and Adjusted R Squared values? Lucid (Whiteboard) What is the F Statistic and the RSE? Based on the information in the output, is this a good model? Why or why not? Edit View Insert Format Tools Table 12pt v Paragraph v B I U A+~ &+ 12+ . - @ ® 3 (Alasc m) Q T & © TueDec17 6:28PM .' Chrome File Edit View History Bookmarks Profiles Tab Window Help ®O®® & ChatGPT x | [l Forestrynspc X = & ChatGPT x | Bl CivilService | X = @ Students-In: X ¥ QuizzWeek1/ X [gll Search&Bro. X = & New Tab X o+ v > G % yu.instructure.com/courses/67802/quizzes/86682/take & % &, @ Relaunch to update } Fall 2024 Home Recall that the Im() function in R is the main function we will use to estimate a Linear Model Syllabus ¥ | (hence the function name Im). The function takes the format of: Announcements ¢ Im(dv ~ iv, data = my_data) for simple linear regression People e Im(dv ~ ivl + iv2, data = my_data) for multiple linear regression Zoom Assign a model, then run the summary() and anova() function to get additional information @ D A8 Assignments | about the model g Grades 0 For instance: @ |Quizzes model<- (dv ~ iv, data = my_data) QF oo mmenmedl anova(model) Lucid (Whiteboard) These functions were also covered in the video posted during the semester: 50 Egerc] » 2 Zoom | Bixpor= O | f Cwr At " am— s G 9 w = “é’w s !‘( ] -
Background image
@ ® ® 3 (Aaec W) Q T @ R © TueDec17 6:29PM X %% QuizzWeek 1/ X [l Search&Bror X | & New Tab x + @ Chrome File Edit View History Bookmarks Profiles Tab Window Help (XX ) ® ChatGPT X I Forestry Inspc X @ ChatGPT X Civil Service X © Students - In ¢« > C % yu.instructure.com/courses/67802/quizzes/86682/take & % &, @ Relaunch to update } These functions were also covered in the video posted during the semester: Fall 2024 Home [ Syllabus oy & Bieen| Hover @) fcms @ B et B e Announcements 28 Plotcey.atebRndon Unforeylob-Handom Horme s col ") et People B % [ . o i Zoom Assignments z Grades o ? T T T T T T 00 02 04 06 08 10 | Quizzes Secure Exam Proctor (Proctorio) here is the corresponding r file: https:/web.stanford.edu/~hastie/ISLR2/Labs/R Labs/Ch2- linreg-lab.R & Lucid (Whiteboard) N Files Plots Packages Help 2 zoom wbxport- | 87 5 Cear Al 18 19 par(mfrow-c(2,2)) 3 ) 191 @ (Top Leved : - - R Script ':;5 Console o © Estinate Std. Error t value Pr(>It]) 2 = - - S— (Intercept) 3.646e+01 5.103e400 7.144 3.28e-12 *** S crim -1.080e-01 3.286e-02 -3.287 0.001087 ** 3 Q00 zn 4.642e-02 1.373e-02 3.382 0.000778 *++ & ® indus 2.056e-02 6.150e-02 0.334 0.738288 S ° chas 2.687¢+00 8.616e-01 T Q o AN nox -1.777€+01 3.820e400 -4.651 4.25¢-0 e%%co B 7 3.810e400 4.179e-01 9. o ®%° @ o P——— age 6.922e-04 1.321e-02 0.052 0.958229 = ° 0 @ ® ® 3 (Aaec W) Q T @ R © TueDec17 6:29PM .' Chrome File Edit View History Bookmarks Profiles Tab Window Help ®O®® & ChatGPT x | [l Forestrynspc X = & ChatGPT x | Bl CivilService | X = @ Students-In: X ¥ QuizzWeek1/ X [gll Search&Bro. X = & New Tab X o+ v > C % yu.instructure.com/courses/67802/quizzes/86682/take % R2 0 Relaunch to update Watch on @3Youlube (R R Fall 2024 Home here is the corresponding r file: https:/web.stanford.edu/~hastie/ISLR2/Labs/R Labs/Ch2- @ Syllabus linreg-lab.R & S > Announcements L Sourceon e g /- Fors Plots Packages Help dice(Fitl,data. frame(lstat-c(5,10, e Zoom 14 #2# Multiple linea o 2 200m Hixport- |87y Ulear A C 15 fit2-lm(medv-1stat.age,data-Boston) | 16 summary(fit2) 17 fit3-Im(medv-.,Boston) 28 Assignments 18 sumary(Fit3) na Ch People SrRun | e y 15)), interval-"confidence™ r regres 19 par(mfrow-c(2,2)) 191 @ (Top Leve) * B R Script + Estimate Std. Error t value Pr(>It1) Grades o Console 4 3.28e-12 *** é (Intercept) 3.646e+01 5. Y Quizzes crim -1.080e-01 3.286e-02 -3.287 0.001087 ** 4 n 4.642¢-02 1.373e-02 3.382 0.000778 *** 2 indus 2.056e-02 6.150e-02 0.334 0.738288 chas 2.687e+00 8.616e-01 3.118 0. - Secure Exam Proctor nox 17776001 3.820e400 -4 - g m 3.810e+00 4.179%e-01 (Proctorio) age 6.922¢-04 1.321e-02 0. | -1.476e400 1.995e-01 -7. rad 3.060e-01 6.635e-02 4.613 5.07€-06 *** tax -1.233e-02 3.760e-03 -3.280 0.001112 ** Lucid (Whiteboard) Watch on @B YouTube EEERESERE \ 1 cor @as c raq e g here is the corresponding r file: https:/web.stanford.edu/~hastie/ISLR2/Labs/R Labs/Ch3- linreg-lab.R & [ | Question 12
Background image
i @D ©® ©® % (Aasc @) Q @ 2 © TueDec17 6:29PM @ Chrome File Edit View History Bookmarks Profiles Tab Window Help ® ChatGPT x | Bl CivilService | X = @ Students-In: X ¥ QuizzWeek1/ X [gll Search&Bro. X = & New Tab X o+ v (XX ) ® ChatGPT X I Forestry Inspc X ¢« > C % yu.instructure.com/courses/67802/quizzes/86682/take & % &, @ Relaunch to update } @ Fall 2024 8 pts | Question 12 Home @ Syllabus %W ] D Announcements for model 1: People | Check the model assumptions using residual analysis. Create the residual plots and explain whether there is a violation by analyzing each plot. Zoom 28 = Assignments For instance, Check for heteroskedasticity by looking at the Residuals vs Fitted Values Plot. g Grades o \ @ | Quizzes Secure Exam Proctor \ Checking for multicollinearity is a fairly straightforward process. What we do is check the VIF g (Proctorio) of our model after we run a regression. When a VIF is greater than 10, that is an indication Lucid (Whiteboard) that there is multicollinearity. Find the Vif for the model vif(model1) Edit View Insert Format Tools Table 12pt v Paragraph v B I U Av £ v T2+ W Y Nl P o 165 oec | 1) . - ‘Q e=UlUunwl AL DT e - LU0 80 @D ® 3 (Alasc m) Q F S © TueDec17 6:29PM .' Chrome File Edit View History Bookmarks Profiles Tab Window Help ®O®® & ChatGPT x | [l Forestrynspc X = & ChatGPT x | Bl CivilService | X = @ Students-In: X ¥ QuizzWeek1/ X [gll Search&Bro. X = & New Tab X o+ v ¢« > C % yu.instructure.com/courses/67802/quizzes/86682/take & % &, @ Relaunch to update } = @ Fall 2024 0“" Home O : Question 13 8 pts @ Syllabus r (%) Announcements for model 2: People Check the model assumptions using residual analysis. Create the residual plots and explain whether there is a violation by analyzing each plot. Zoom Assignments 28 0 \ g Grades O ® For instance, Check for heteroskedasticity by looking at the Residuals vs Fitted Values Plot. | Quizzes Checking for multicollinearity is a fairly straightforward process. What we do is check the VIF of our model after we run a regression. When a VIF is greater than 10, that is an indication Secure Exam Proctor (Proctorio) that there is multicollinearity. Lucid (Whiteboard) (model2) Edit View |Insert Format Tools Table 12pt v Paragraph v B J U Av 2 v T2v
Background image
@D ® 3 (Alasc m) Q F S © TueDec17 6:29PM . @ Chrome File Edit View History Bookmarks Profiles Tab Window Help ® ChatGPT x | Bl CivilService | X = @ Students-In: X ¥ QuizzWeek1/ X [gll Search&Bro. X = & New Tab X o+ v (XX ) ® ChatGPT X I Forestry Inspc X ¢« > C 25 yu.instructure.com/courses/67802/quizzes/86682/take o % R2 0 Relaunch to update : @ Fall 2024 i Home [ : Question 14 8 pts @ Syllabus | D Announcements for model 3: People | Check the model assumptions using residual analysis. Create the residual plots and explain Zoom whether there is a violation by analyzing each plot. A8 = Assignments 8l Grades o | Quizzes For instance, Check for heteroskedasticity by looking at the Residuals vs Fitted Values Plot. Checking for multicollinearity is a fairly straightforward process. What we do is check the VIF of our model after we run a regression. When a VIF is greater than 10, that is an indication Secure Exam Proctor (Proctorio) | that there is multicollinearity. Lucid (Whiteboard) | vif(model3) Edit View Insert Format Tools Table 12pt v Paragraph v B 7 U Av £ v T2v :
Background image
@& Chrome File Edit View History Bookmarks Profiles Tab Window Help @D ® 3 (Alasc m) Q F S © TueDec17 6:29PM ®O®® & ChatGPT x | [l Forestrynspc X = & ChatGPT x | Bl CivilService | X = @ Students-In: X ¥ QuizzWeek1/ X [gll Search&Bro. X = & New Tab X o+ v ¢« > C % yu.instructure.com/courses/67802/quizzes/86682/take & % &, @ Relaunch to update } Edit View Insert Format Tools Table Fall 2024 12pt v Paragraph v B I U A+~ 2 v T2v Home @ Syllabus D Announcements P ® Owords =~ </> /' People 28 Zoom o Assignments [ [0 | Question 15 5 pts g Grades (6] [ \ Quizzes @ Upload the dataset Secure Exam Proctor ?) (Proctorio) Lucid (Whiteboard) Upload | Choose a File Quiz saved at 6:28pm Submit Quiz
Background image