Question

Please use RStudio, thanks! 3. This problem uses the prostate data set in the faraway package....

Please use RStudio, thanks!
3. This problem uses the prostate data set in the faraway package.

(a) Plot lpsa against lcavol. Use the R function lm() to fit the regressions of lpsa on lcavol and lcavol on lpsa.
(b) Display both regression lines on the plot. At what point do the two lines intersetct? Give a brief explanation.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

From the property of linear Regression model we know that regression line will always passes through the () if we fit the model y on x

and it will also pass through the same point if we fit x on y because the points will remain the same.

So the line passes through

Add a comment
Know the answer?
Add Answer to:
Please use RStudio, thanks! 3. This problem uses the prostate data set in the faraway package....
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
  • 2. The data set prostate in the faraway package is from a study on 97 men...

    2. The data set prostate in the faraway package is from a study on 97 men with prostate cancer who were due to receive a radical prostatectomy. We are interest is in predicting lpsa (log prostate specific antigen) with lcavol (log cancer volume). (a) Draw a scatterplot - does a simple linear regression model seem reasonable? (b) Without using the R function Im(0, compute the values , Y,Sxx, Syy and Sxy. Com pute the ordinary least squares estimates of the...

  • 2. R programming 2·The data set prostate in the faraway package is froma study on 97...

    2. R programming 2·The data set prostate in the faraway package is froma study on 97 men with prostate cancer who were due to receive a radical prostatectomy We are interest is in predicting lpsa (log prostate specific antigen) with Icavol (log cancer volume). (a) Draw a scatterplot -does a simple linear regression model seem reasonable? (b) Without using the R function Im), compute the values T,Y, Sxx, Syy and Sxy. Com- pute the ordinary least squares estimates of the...

  • R programming question. Please use #comments too ! 1. The data set UN11 in the alr4...

    R programming question. Please use #comments too ! 1. The data set UN11 in the alr4 package contains several variables, including ppgdp, per capita gross domestic product in US dollars, and fertility, number of children per woman, from the year 2009-2011. The data are for 199 localities, and we will study the regression of ppgdp on fertility (a) Draw the scatterplot of ppgdp against fertility and describe the relationship between these two variables. Is the trend linear? nD the simple...

  • 3. This problem uses the wblake data set in the alr4 package. This data set includes...

    3. This problem uses the wblake data set in the alr4 package. This data set includes samples of small mouth bass collected in West Bearskin Lake, Minnesota, in 1991. Interest is in predicting length with age. Complete this problem without using Im) in R. (a) Do the regression of length on age, and report the estimates, their standard errors and the estimate of variance. Interpret Bo and B. (b) Obtain a 90% confidence interval for A from the data. Interpret...

  • 3. R programming 3. This problem uses the wblake data set in the alr4 package. This...

    3. R programming 3. This problem uses the wblake data set in the alr4 package. This data set includes samples of small mouth bass collected in West Bearskin Lake, Minnesota, in 1991 Interest is in predicting length with age. Complete this problem without using Im( in R (a) Do the regression of length on age, and report the estimates, their standard errors and the estimate of variance. Interpret Bo and (b) Obtain a 900% confidence interval for βί fron the...

  • Exercise 1. For this exercise use the bdims data set from the openintro package. Type ?bdims to r...

    Exercise 1. For this exercise use the bdims data set from the openintro package. Type ?bdims to read about this data set in the help menu. Of interest are the variables hgt (height in centimeters), wgt (weight in kilograms), and sex (dummy variable with 1-male, 0-female). Since ggplotO requires that a categorical variable be coded as a factor type in R, run the following code: library (openintro) bdíms$sex2 <-factor (bdins$sex, levels-c (0,1), labels=c('F', 'M')) (a) Use ggplot2 to make a...

  • This problem uses the Wage dataset in ISLR package in R n this part of the...

    This problem uses the Wage dataset in ISLR package in R n this part of the problem, we will find a polynomial function of age that best fits the wage data. For each polynomial function between p = 0, 1, 2, ...10: i. Fit a linear regression to predict wages as a function of age, age2, ... agep (you should include an intercept as well). Note that p = 0 model is an “intercept-only” model ii. Use 5-fold cross validation...

  • 1. The data set UN11 in the alr4 package contains several variables, including ppgdp, per capita...

    1. The data set UN11 in the alr4 package contains several variables, including ppgdp, per capita gross domestic product in US dollars, and fertility, number of children per woman, from the year 2009-2011. The data are for 199 localities, and we will study the regression of ppgdp on fertility. (a) Draw the scatterplot of ppgdp against fertility and describe the relationship between these two variables. Is the trend linear? (b) Replace both variables by their natural logarithms and draw another...

  • 4. The anscombe data set in the datasets R package (should automatically be loaded) contains 4 pa...

    4. The anscombe data set in the datasets R package (should automatically be loaded) contains 4 pairs of response-explanatory variables. The pairs are xl-yl, x2-y2, x3-y3, and x4-y4 where x is the explanatory variable and y is the response variable. (a) Run 4 simple linear regression analyses (one on each of the 4 pairs) to verify that the regression output is exactly the same (up to numerical accuracy) b) For each pair, describe what is wrong (if anything) and use...

  • Show work please, Thanks! Question 3: The regression line equation for a set of data is...

    Show work please, Thanks! Question 3: The regression line equation for a set of data is given by y-hat = 2.3x+5 with n = 10. The mean value of y is 10.1 for the data set. Use a = 0.05. A. If the linear correlation coefficient is r=0.521, what is the best predicted y-value for x = 5? Justify for your answer. B. If the linear correlation coefficient is r = 0.972, what is the best predicted y-value for x...

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