Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help with questions 2f and 2g ONLY. The first image is the full question, and under it i provided the equation from 2e that
Please help with questions 2f and 2g ONLY.
The first image is the full question, and under it i provided the equation from 2e that is needed for 2f and 2g.
Any help is greatly appreciated, and R-language is preferred. Thanks! :)
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) Briey 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 mction to determine the correlation matrix for the three (logged) variables. (2d). (2 pts) Are there missing values? (2e). (2 pts) Use the lm function in R to t the multiple regression model, log Volume; = o + 1311012; Gil'thi, + 52 103 Height, + 511 and print out the summary of the model t. (21). (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 coefcient estimates in the summary output are given by the least squares formula: (XTX)1XTy. (2g). (3 pts) Compute the predicted response values from the tted regression model, the residuals, and an estimate of the error variance Var(s) = a2. PART2E) The linear regression equation; Volume = 67.9877 + 4.7082 * Girth + 0.3393 * Height #to build a multiple linear regression model model |t|) (Intercept) -57.9877 8.6382 -6.713 2.75e07 *** Girth 4.7082 0.2643 17.816Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started