A plot of heart weight (heart) versus body welight (veight), for Cape Fur Seal data in the dataset ctseal (DAAG) shows a relationship that is approximately linear. Check this. However, variability about the line increases with increasing weight. It is better to work with log (heart) and log (weight), where the relationship is again close to linear, but variability about the line is more homogeneous. Such a linear relationship is consistent with biological allometry, here across different individuals. Allometric relationships are pairwise linear on a logarithmic scale. Task 1: Plot log (heart) against log (weight), Task 2: Fit the least squares regression line for log (heart) on log (weight). Note: this is a linear regression model to fit log (heart) and log (weight) (Hint weight is independent variable, and heart is the dependent variabl.) Task 3: After you have the Im model trained, please summary the model and what you find from the summary.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

In R Studio 

A plot of heart weight (heart) versus body weight (veight), for Cape Fur Seal data in
the dataset cfseal (DAAG) shows a relationship that is approximately linear. Check
this. However, variability about the line increases with increasing weight. It is better to
work with log (heart) and log (weight), where the relationship is again close to
linear, but variability about the line is more homogeneous. Such a linear relationship is
consistent with biological allometry, here across different individuals. Allometric
relationships are pairwise linear on a logarithmic scale.
Task 1: Plot log (heart) against log (weight),
Task 2: Fit the least squares regression line for log (heart) on log (weight). Note:
this is a linear regression model to fit log (heart) and log (weight) (Hint weight is
independent variable, and heart is the dependent variabl.)
Task 3: After you have the Im model trained, please summary the model and what you
find from the summary.
Transcribed Image Text:A plot of heart weight (heart) versus body weight (veight), for Cape Fur Seal data in the dataset cfseal (DAAG) shows a relationship that is approximately linear. Check this. However, variability about the line increases with increasing weight. It is better to work with log (heart) and log (weight), where the relationship is again close to linear, but variability about the line is more homogeneous. Such a linear relationship is consistent with biological allometry, here across different individuals. Allometric relationships are pairwise linear on a logarithmic scale. Task 1: Plot log (heart) against log (weight), Task 2: Fit the least squares regression line for log (heart) on log (weight). Note: this is a linear regression model to fit log (heart) and log (weight) (Hint weight is independent variable, and heart is the dependent variabl.) Task 3: After you have the Im model trained, please summary the model and what you find from the summary.
Here are some code segment/template that you may use for this question
#install the necessary package for dataset.
install.packages ("DAAG")
library (DAAG)
#Create log for "heart" and "weight"
cflog <- log (cfseal [, c("heart", "weight")])
names (cflog) <- c("logheart", "logweight")
#Task 1: Below this comment line, you need to make a scatterplot
for logheart and logweight.
#Task 2: Below this comment line, you need to train a lm model.
#Below this line, draw a abline for trained model in the plot
#Task 3: Below this comment line, draw the summary of the model.
You may use a proper function to get this summary, and from the
summary, what do you find (write your answer statement in comment
block.)?
Transcribed Image Text:Here are some code segment/template that you may use for this question #install the necessary package for dataset. install.packages ("DAAG") library (DAAG) #Create log for "heart" and "weight" cflog <- log (cfseal [, c("heart", "weight")]) names (cflog) <- c("logheart", "logweight") #Task 1: Below this comment line, you need to make a scatterplot for logheart and logweight. #Task 2: Below this comment line, you need to train a lm model. #Below this line, draw a abline for trained model in the plot #Task 3: Below this comment line, draw the summary of the model. You may use a proper function to get this summary, and from the summary, what do you find (write your answer statement in comment block.)?
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Introduction to computer system
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education