Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

All of question 2. If you can answer question 3 as well it would be helpful Q2. The dataset trees contains measurements of Girth (actually,

image text in transcribedimage text in transcribedAll of question 2. If you can answer question 3 as well it would be helpful

Q2. The dataset trees contains measurements of Girth (actually, tree diameter) in inches, Height in feet, and Volume of timber (in cubic feet) of a sample of 31 felled black cherry trees. The following commands can be used to read the data into R. The dataset can be accessed under the name trees. # the dataset "trees" is contained in the R package "datasets" require(datasets) trees (2a). (1 pt) Briefly describe the dataset trees, i.e., how many observations (rows) and how many variables (columns) are there in the dataset? What are the variable names? (2b). (2 pts) Use the pairs function to construct a scatterplot matrix of the logarithms of Girth, Height and Volume. (2c). (2 pts) Use the cor function to determine the correlation matrix for the three (logged) variables. (2d). (2 pts) Are there missing values? (2e). (2 pts) Use the Im function in R to fit the multiple regression model, log Volume; = Bo + B, log Girthi + B2 log Height; + Ei and print out the summary of the model fit. (2f). (2 pts) Create the design matrix (i.e., the matrix of predictor variables), X, for the model in (2e), and verify that the least squares coefficient estimates in the summary output are given by the least squares formula: (X7x)-{X?y. (2g). (3 pts) Compute the predicted response values from the fitted regression model, the residuals, and an estimate of the error variance Var() = 02. Q3. (8 pts) Consider the simple linear regression model: Yi = Bo + Bixi +Ei Show that minimizing the sum of squared residuals lead to the following least squares coefficient estimates: 8o = - it, Bi - D=1(li 7)(yi ) 21=1(x; 7)2 where y = nZi=1 Yi and = nLi=1 li

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions