Question

If we have a multiple linear regression model: lm(life ~ male + birth + divo +...

If we have a multiple linear regression model:
lm(life ~ male + birth + divo + beds + educ + inco, data = DATA)

(1) What R command should we use to plot it standardized residuals against the FITTED values?
(2) What R command should we use to compute and plot the leverage of each point and identify the points that have a leverage larger than 0.5?
(3) What R command should we use to compute the Cook's distance for each point and identify the points that have Cook's distance larger than 1?

I didn't attach the actual data here as I only want to know the R command need to accomplish the above tasks. Thanks

Homework Answers

Answer #1

As you have a R code for a multiple linear regression model

model = lm(life ~ male + birth + divo + beds + educ + inco, data = DATA)

# (1) What R command should we use to plot it standardized residuals against the FITTED values?

Solution:


standarized_val = rstandard(model)
plot(standarized_val, DATA$life,
ylab="Standardized Residuals",
xlab="FITTED values",
main="Plots: Std residuals vs FITTED values")

# (2) What R command should we use to compute and plot the leverage of each point and identify the points that have a leverage larger than 0.5?

Solution:


lev = hatvalues(model)
plot(lev,col=ifelse(lev>0.5,"red","black"))


#(3) What R command should we use to compute the Cook's distance for each point and identify the points that have Cook's distance larger than 1?

Solution:

cook <- cooks.distance(model)
plot(cook,col=ifelse(cook>1,"red","black"))

Know the answer?
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
Similar Questions
22. We fit a simple linear regression model using price (in dollars) to predict the number...
22. We fit a simple linear regression model using price (in dollars) to predict the number of packets of dog biscuits sold per day. The regression equation is y = 98.1 - 9.8x, and R2 = 0.5275. Explain how to interpret the R2 in the context of this problem.: * (A) 52.75% of the variation in the price is explained by the number of packets of dog biscuits sold per day. (B) 52.75% of the variation in the number of...
If you run summary() command on a result of linear model fitting returned by lm(), you...
If you run summary() command on a result of linear model fitting returned by lm(), you will see a column Pr(>t). You could guess that it is a result of some t-test. How does it apply here? So far we have seen t-tests in the settings of testing sample locations. The ingredients were: 1) null hypothesis: in earlier cases we looked into the null that stated that two samples came from the distribution(s) with the same mean(s); 2) test statistic:...
In R, if I have a plot of LIFE against BIRTH and I want to specifically...
In R, if I have a plot of LIFE against BIRTH and I want to specifically mark the data point corresponding to STATE "AK" in the graph as red colour(the rest of the points as black color), what R command should we use?(Please don't look through the data to find AK's birth value(24.8)or life value (69.31)and mark this point manually referring to this value as other state can have the same birth and life value) "STATE" "MALE" "BIRTH" "DIVO" "BEDS"...
Census data was collected on the 50 states and Washington, D.C. We are interested in determining...
Census data was collected on the 50 states and Washington, D.C. We are interested in determining whether average lifespan (LIFE) is related to the ratio of males to females in percent (MALE), birth rate per 1,000 people (BIRTH), divorce rate per 1,000 people (DIVO), number of hospital beds per 100,000 people (BEDS), percentage of population 25 years or older having completed 16 years of school (EDUC) and per capita income (INCO), with LIFE (y) as the response variable, and MALE...
A hypothesis test using a Pearson’s correlation coefficient is an example of what? A nonparametric statistic...
A hypothesis test using a Pearson’s correlation coefficient is an example of what? A nonparametric statistic A descriptive statistic An inferential statistic A power statistic 1 points    QUESTION 48 What would the scatter plot show for data that produce a Pearson correlation of r = +0.88? Points clustered close to a line that slopes down to the right Points clustered close to a line that slopes up to the right Points widely scattered around a line that slopes up...
1. General features of economic time series: trends, cycles, seasonality. 2. Simple linear regression model and...
1. General features of economic time series: trends, cycles, seasonality. 2. Simple linear regression model and multiple regression model: dependent variable, regressor, error term; fitted value, residuals; interpretation. 3. Population VS sample: a sample is a subset of a population. 4. Estimator VS estimate. 5. For what kind of models can we use OLS? 6. R-squared VS Adjusted R-squared. 7. Model selection criteria: R-squared/Adjusted R-squared; residual variance; AIC, BIC. 8. Hypothesis testing: p-value, confidence interval (CI), (null hypothesis , significance...
1.    In a multiple regression model, the following coefficients were obtained: b0 = -10      b1 =...
1.    In a multiple regression model, the following coefficients were obtained: b0 = -10      b1 = 4.5     b2 = -6.0 a.    Write the equation of the estimated multiple regression model. (3 pts) b     Suppose a sample of 25 observations produces this result, SSE = 480. What is the estimated standard error of the estimate? (5 pts) 2.    Consider the following estimated sample regression equation: Y = 12 + 6X1 -- 3 X2 Determine which of the following statements are true,...
We have a sample of NES games that are either sports games or action/adventures and consider...
We have a sample of NES games that are either sports games or action/adventures and consider North American Sales (in millions of dollars). Is there evidence that action/adventure games sold better in North American than sports games? Assume each sample shows evidence of a normal distribution.                                                                                                                                                (15 points) Explain why the two-sample t test is the correct method for the following data: Sports Action Mean 0.649 1.541667 Std Dev 0.62417 1.082714 size 11 12 Use the recommended sequence of...
Do larger universities tend to have more property crime? University crime statistics are affected by a...
Do larger universities tend to have more property crime? University crime statistics are affected by a variety of factors. The surrounding community, accessibility given to outside visitors, and many other factors influence crime rate. Let x be a variable that represents student enrollment (in thousands) on a university campus, and let y be a variable that represents the number of burglaries in a year on the university campus. A random sample of n = 8 universities in California gave the...
Recall that Benford's Law claims that numbers chosen from very large data files tend to have...
Recall that Benford's Law claims that numbers chosen from very large data files tend to have "1" as the first nonzero digit disproportionately often. In fact, research has shown that if you randomly draw a number from a very large data file, the probability of getting a number with "1" as the leading digit is about 0.301. Now suppose you are the auditor for a very large corporation. The revenue file contains millions of numbers in a large computer data...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT