Question

In: Math

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

Listed below are the log body weights and log brain weights of the primates species in the data set ”mammals”. Find the equation of the least squares line with y = log brain weight and x = log body weight. Do it by hand, by constructing a table like the one in Example 9.1. Then do it with your calculator as efficiently as possible. Finally, use the lm function in R to do it by creating a linear model object ”primates.lm”. The model formula is ”log(brain)∼log(body)”. You can select the primates and put them in a 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”, as in

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

Alternatively, you can just use ”mammals[primatenames, ]” as the data 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

Solutions

Expert Solution

The dataset is not given hence we use the mammalssleep data set ,

the r code is as below

data("mammalsleep")

primatenames <- c("Owl monkey", "Patas monkey", "Gorilla")

primates= mammalsleep %>% filter(species %in% primatenames)
#Your ”data” argument in calling lm would be ”data=primates”, as in
primates.lm=lm(log(brw)~log(bw),data=primates)

summary(primates.lm)

The results of the regression is

summary(primates.lm)

Call:

lm(formula = log(brw) ~ log(bw), data = primates)

Residuals:

1 2 3

-0.1233 -0.1231 0.2464

Coefficients:

Estimate Std. Error t value Pr(>|t|)  

(Intercept) 3.25902 0.23780 13.705 0.0464 *

log(bw) 0.53831 0.07035 7.652 0.0827 .

---

Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.3018 on 1 degrees of freedom

Multiple R-squared: 0.9832, Adjusted R-squared: 0.9664

F-statistic: 58.55 on 1 and 1 DF, p-value: 0.08273

The regression equation is formed using the

as

log(brw) = 3.25 +0.5383*log(bw)

the r2 value is 0.9832 , this means that the model is very good, higher the value better the model range is 0 to 1

also note that r2 means that about 98.32 % variation in data is explained by the model


Related Solutions

Listed below are the body lengths (in inches) and weights (in lb) of randomly selected bears:...
Listed below are the body lengths (in inches) and weights (in lb) of randomly selected bears: Length 40         64         65         49         47 Weight 65        356       316        94         86 Find the value of the linear correlation coefficient. Letting y represent weights of bears and letting x represent their lengths, find the regression equation. Based on the given sample data, what is the best predicted weight of a bear with a length of 72.0 inch ?
Listed below are the body lengths (in inches) and weights (in lb) of randomly selected bears:...
Listed below are the body lengths (in inches) and weights (in lb) of randomly selected bears: Length 40         64         65         49         47 Weight 65        356       316        94         86 Find the value of the linear correlation coefficient. Letting y represent weights of bears and letting x represent their lengths, find the regression equation. Based on the given sample data, what is the best predicted weight of a bear with a length of 72.0 inch?
8. What are the species in the event that the ratio of brain weight to body...
8. What are the species in the event that the ratio of brain weight to body weight is greater than 0.02? Remember that brain weight is recorded in grams and body weight in kilograms, so body weight must be multiplied by 1000 to make the two weights comparable. The species belonging to this event can be obtained with the R command > subset(mammals,brain/body/1000 > 0.02) What is the probability of that event?
5 Briefly describe the functions of the parts of the brain listed in the table below.
5 Briefly describe the functions of the parts of the brain listed in the table below.6 List the parts some of the cranial nerves innervate and the functions they control:What would happen if Vagus (NX) nerve is cut?Which of the above listed nerves are sensory only?Which of the above listed nerves are mixed nerves?
Which of the following statements is correct for primates in general? Select one: a. Species that...
Which of the following statements is correct for primates in general? Select one: a. Species that are pair-bonded have the minimum degree of sexual dimorphism in body size. b. Multimale, multifemale groups tend to have a higher degree of sexual dimorphism in body size than one-male, multifemale groups. c. Multimale, multifemale groups with polygynandry are not sexually dimorphic in body size. d. One-male, multifemale polygynous groups have less sexual dimorphism in body size relative to pair-bonded species.
Listed below are the overhead widths​ (in cm) of seals measured from photographs and the weights​...
Listed below are the overhead widths​ (in cm) of seals measured from photographs and the weights​ (in kg) of the seals. Construct a​ scatterplot, find the value of the linear correlation coefficient​ r, and find the critical values of r using alpha=0.05 Is there sufficient evidence to conclude that there is a linear correlation between overhead widths of seals from photographs and the weights of the​ seals? Overhead Width 7.17.1 7.67.6 9.79.7 9.39.3 8.98.9 8.38.3 Weight 112112 192192 241241 199199...
Listed below are the overhead widths​ (in cm) of seals measured from photographs and the weights​...
Listed below are the overhead widths​ (in cm) of seals measured from photographs and the weights​ (in kg) of the seals. Construct a​ scatterplot, find the value of the linear correlation coefficient​ r, and find the critical values of r using alpha equals0.05 . Is there sufficient evidence to conclude that there is a linear correlation between overhead widths of seals from photographs and the weights of the​ seals? Overhead Width 7.1 7.6 9.7 9.3 8.6 8.2 Weight 115 197...
Listed below are the overhead widths​ (in cm) of seals measured from photographs and the weights​...
Listed below are the overhead widths​ (in cm) of seals measured from photographs and the weights​ (in kg) of the seals. Construct a​ scatterplot, find the value of the linear correlation coefficient​ r, and find the critical values of r using α=0.05. Is there sufficient evidence to conclude that there is a linear correlation between overhead widths of seals from photographs and the weights of the​ seals? Overhead Width 7.1 7.6 9.9 9.3 8.7 8.2 Weight 113 177 250 199...
Listed below are the overhead widths​ (in cm) of seals measured from photographs and the weights​...
Listed below are the overhead widths​ (in cm) of seals measured from photographs and the weights​ (in kg) of the seals. Construct a​ scatterplot, find the value of the linear correlation coefficient​ r, and find the critical values of r using alphaαequals=0.010.01. Is there sufficient evidence to conclude that there is a linear correlation between overhead widths of seals from photographs and the weights of the​ seals? Overhead Width 7.17.1 7.77.7 9.69.6 9.49.4 8.88.8 8.18.1 Weight 112112 197197 241241 205205...
Listed below are annual data for various years. The data are weights ( metric tons) of...
Listed below are annual data for various years. The data are weights ( metric tons) of imported lemons and car crash fatality rates per 100,000 population. Construct a scatterplot, find the value of the linear correlation coefficient 'r' and find the P- value using significance level 0.05. Is there sufficient evidence to conclude that there is a linear correlation between lemon imports and crash fatality rates? Do the results suggest that imported lemons cause car fatalities? Lemon imports 232 266...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT