Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the Rcode to do the following: load the SeatBelts(PetrolPrice,DriversKilled) dataset package via data(SeatBelts). Convert the object to dataframe. Assume new petrol price denoted as

image text in transcribed
Write the Rcode to do the following: load the SeatBelts(PetrolPrice,DriversKilled) dataset package via data(SeatBelts). Convert the object to dataframe. Assume new petrol price denoted as PP to be computed using mean(PetrolPrice)/Sd(PetrolPrice) and new kms, to be denoted as new_kms = mean (km)1000. Fit the linear model with new values where DriversKilled is the outcome and predictors are PP and new_kms. Also predict the number of driver deaths at the mean kms and average PetrolPrice levels. Write the Rcode to get the best fit line based on least square criteria using GaltonFamilies data with child's height as predictor and parents height as outcome. Compute the slope after re-centering the data. Also mention the code to verify the output using linear model formula. Write the Rcode to show that the normalizing the variable results in the slope being correlation. Use Galton data with parents height as predictor and child heights as outcome

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 31st International Conference Dexa 2020 Bratislava Slovakia September 14 17 2020 Proceedings Part 1 Lncs 12391

Authors: Sven Hartmann ,Josef Kung ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

303059002X, 978-3030590024

More Books

Students also viewed these Databases questions

Question

U11 Informing Industry: Publicizing Contract Actions 317

Answered: 1 week ago