Question

1. For each of the following regression models, write down the X matrix and 3 vector. Assume in both cases that there are fou
The plots along the diagonal are of course not scatterplots (if they were, they would all be straight lines), but show estima
open3d () plot3d (disp, open3d ) plot3d (drat, wt, mpg, col=blue ) wt, mpg, col-blue) Can you tell from these plots which
1. For each of the following regression models, write down the X matrix and 3 vector. Assume in both cases that there are four observations (a) Y BoB1X1 + B2X1X2 (b) log Y Bo B1XiB2X2+ 2. For each of the following regression models, write down the X matrix and vector. Assume in both cases that there are five observations. (a) YB1XB2X2+BXE (b) VYBoB, X,a +2 log10 X2+E regression model never reduces R2, why 3. If adding predictor variables to a not just include all the available predict or variables in the model? Also, remark on the meaning of Rd adj 4. Recall the simple correlation coefficient r is signed. Why is it not meaning ful to include a sign on the coefficient of multiple correlation (or coefficient of determination) R2? The data set called mtcars is included in the basic R installation and contains information on 1973-74 model automobiles, including miles per gallon, number of cylinders, displacement (cubic inches), gross horsepower, read axle ratio, weight (in lbs/1000), quarter mile time in seconds, v- or straight (V-0, straight 1), transmission (coded so 0 = automatic and 1 manual), number of forward gears, and number of carburetors. This data set came from the 1974 Motor Trend magazine. You can see the data set by simply typing mtcars at the prompt: mtcars Use this data set to answer the remaining questions. I have included R code to help you 5. Make a scatterplot matrix of the mpg, dips, drat, and wt variables, indi- cating the numbers of gears like this library (car) scatterplot.matrix ( "mpg+ disp+ drat +wt | cyl, main-"Three Cylinder Options") data-mtcars,
The plots along the diagonal are of course not scatterplots (if they were, they would all be straight lines), but show estimated density functions for each variable, color-coded for the number of cylinders. Each of the scatterplots includes a fitted regression line, as well as a lowess-smoothed trend curve (which is There are also rug plots in the cell margins. Comment generally on a few things that you observe about these five variables based on the scatterplot matrix, specifically about the trends between the quantitative variables and also if the mumber of cylinders seems to be a factor. Note the legend for the numbers of cylinders is located in one of the plots. more sophisticated way of estimating trends). a 6. Get a sample correlation matrix of the same four quantitative variables from the previous part like this: attach (mtcars) d data.frame (mpg, disp, drat, vt) cor(d) Which variable pairs seem most correlated now? Also, explain the mag- nitude and direction of the correlations. 7. Fit a GLM that attempts to predict mpg based on disp, wt, and drat. Use planar model of the form mipg bo + b x disp+b2 x wt +bs x drat: a 1m(mpg disp drat t) out
0 0
Add a comment Improve this question Transcribed image text
Answer #1

) Set up the x mataie B veetos cahese 1,2, -- 4. E4 X12 X22 K22 X13 X31 X32 By using tavy famwialon method Let y - F,, + P, X1X,, X12 1X21 X22 X21 X32 O thx Ihx CS Scanned with CamScanner

As per HomeworkLib policy we need to solve one question per post. Please post the remaining questions in another post.

Add a comment
Know the answer?
Add Answer to:
1. For each of the following regression models, write down the X matrix and 3 vector....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The Motor Trend Car Road Tests dataset mtcars, in faraway R package, was extracted from the...

    The Motor Trend Car Road Tests dataset mtcars, in faraway R package, was extracted from the 1974 Motor Trend US magazine, and comprises fuel consumption and 10 aspects of automobile design and performance for 32 automobiles (1973–74 models). The data frame has 32 observation on 11 (numeric) variables: mpg: Miles/(US) gallon; cyl: Number of cylinders; disp: Displacement (cu.in.); hp: Gross horsepower; drat: Rear axle ratio; wt: Weight (1000 lbs); qsec: 1/4 mile time; vs: Engine (0 = V-shaped, 1 =...

  • The data set "mtcars" in R has 11 variables with 32 observations. A data frame with...

    The data set "mtcars" in R has 11 variables with 32 observations. A data frame with 32 observations on 11 variables. [, 1] mpg Miles/(US) gallon [, 2] cyl Number of cylinders [, 3] disp Displacement (cu.in.) [, 4] hp Gross horsepower [, 5] drat Rear axle ratio [, 6] wt Weight (1000 lbs) [, 7] qsec 1/4 mile time [, 8] vs V/S [, 9) am Transmission (0 = automatic, 1 = manual) [,10] gear Number of forward gears...

  • Answer the following question by showing the codes in R 2. Consider the dataset mtcars and...

    Answer the following question by showing the codes in R 2. Consider the dataset mtcars and suppose we are interested in modeling the mpg of a vehicle based on a single variable presented in the dataset. a) Use the cor ) function in R, apply it to only numerical variables in the dataset. Identify the numerical variable that shows the most significant correlation, and generate a scatterplot between this variable and mpg. b) Use the 1m() function in R to...

  • PLEASE ANSWER ALL parts . IF YOU CANT ANSWER ALL, KINDLY ANSWER PART (E) AND PART(F)...

    PLEASE ANSWER ALL parts . IF YOU CANT ANSWER ALL, KINDLY ANSWER PART (E) AND PART(F) FOR PART (E) THE REGRESSION MODEL IS ALSO GIVE AT THE END. REGRESSION MODEL: We will be returning to the mtcars dataset, last seen in assignment 4. The dataset mtcars is built into R. It was extracted from the 1974 Motor Trend US magazine, and comcaprises fuel consumption and 10 aspects of automobile design and performance for 32 automobiles (1973-74 models). You can find...

  • 2. What is the coefficient of correlation between miles per gallon and weight? What is the...

    2. What is the coefficient of correlation between miles per gallon and weight? What is the sign of the correlation coefficient? Does the coefficient of correlation indicate a strong correlation, weak correlation, or no correlation between the two variables? How do you know? See Step 3 in the Python script. 3. Write the simple linear regression equation for miles per gallon as the response variable and weight as the predictor variable. How might the car rental company use this model?...

  • Considering multiple linear regression models, we compute the regression of Y, an n x 1 vector,...

    Considering multiple linear regression models, we compute the regression of Y, an n x 1 vector, on an n x (p+1) full rank matrix X. As usual, H = X(XT X)-1 XT is the hat matrix with elements hij at the ith row and jth column. The residual is e; = yi - Ýi. (a) (7 points) Let Y be an n x 1 vector with 1 as its first element and Os elsewhere. Show that the elements of the...

  • Considering multiple linear regression models, we compute the regression of Y, an n x 1 vector,...

    Considering multiple linear regression models, we compute the regression of Y, an n x 1 vector, on an n x (p+1) full rank matrix X. As usual, H = X(XT X)-1 XT is the hat matrix with elements hij at the ith row and jth column. The residual is e; = yi - Ýi. (a) (7 points) Let Y be an n x 1 vector with 1 as its first element and Os elsewhere. Show that the elements of the...

  • The standard linear regression model is: y = Xw+e, where X is an nxd matrix of...

    The standard linear regression model is: y = Xw+e, where X is an nxd matrix of predictor vari- ables, y is an n-dimensional vector of response variables, and e N (0,021) is an n-dimensional vector of model errors. (a) What is the PDF of y in terms of X,w, o?? N(0,p1). (b) Let the PDF from part (a) be denoted as fylw). Suppose also in this case that w Write an expression for the joint PDF of w and y...

  • correlation and regression 210 Statistics EXTRA CREDIT Correlation and Regression Formulas written Assignment 1. Follow the...

    correlation and regression 210 Statistics EXTRA CREDIT Correlation and Regression Formulas written Assignment 1. Follow the instructions below to calculate the correlation coefficient and least squares regression line for the data set below. Z 22,- The sample means and sample standard deviations for the two variables are listed below: X = 4 x = 2 3 =5 Sy = 1 The linear correlation coefficient is = 52. Calculate this correlation coefficient using the steps below: (a) First, complete the columns...

  • 3. In the multiple regression model shown in the previous question, which one of the following st...

    3. In the multiple regression model shown in the previous question, which one of the following statements is incorrect: (b) The sum of squared residuals is the square of the length of the vector ü (c) The residual vector is orthogonal to each of the columns of X (d) The square of the length of y is equal to the square of the length of y plus the square of the length of û by the Pythagoras theorem In all...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT