Listed below are the log body weights and log brain weights of the primates species in...

50.1K

Verified Solution

Question

Basic Math

Listed below are the log body weights and log brain weights ofthe primates species in the data set ”mammals”. Find the equationof the least squares line with y = log brain weight and x = logbody weight. Do it by hand, by constructing a table like the one inExample 9.1. Then do it with your calculator as efficiently aspossible. Finally, use the lm function in R to do it by creating alinear model object ”primates.lm”. The model formula is”log(brain)?log(body)”. You can select the primates and put them ina new data frame by first listing the primate species names:

> primatenames=c(”Owl monkey”, ”Patas monkey”, ”Gorilla”,etc.)

and then

> primates=mammals[primatenames, ]

Your ”data” argument in calling lm would be ”data=primates”, asin

> primates.lm=lm(log(brain)?log(body),data=primates)

Alternatively, you can just use ”mammals[primatenames, ]” as thedata argument in lm, that is,

> primates.lm=lm(log(brain)?log(body),data=mammals[primatenames,])

log body             log brain

Owl monkey                     -0.7339692         2.740840

Patas monkey                  2.3025851          4.744932

Gorilla                                 5.3327188          6.006353

Human                               4.1271344          7.185387

Rhesus monkey                              1.9169226          5.187386

Chimpanzee                                     3.9543159          6.086775

Baboon                                               2.3561259          5.190175

Verbet                                                1.4327007          4.060443

Galago                                                 -1.6094379        1.609438

Slow loris                                           0.3364722          2.525729

Answer & Explanation Solved by verified expert
3.7 Ratings (264 Votes)
The dataset is not given hence we use the mammalssleep data set the r code is as below datamammalsleep primatenames filterspecies in primatenames Your data argument in calling lm would be    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students