Correct Answer: lm(Y ~ X)$residuals - lm(Y ~ X)$fitted.values
Explanation:
Note: This Question is unanswered, help us to find answer for this one
R Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More R MCQ Questions
Let X be a 3x4 matrix with non-zero values. The result of: > apply(X, 2, mean), is:
Suppose X is the vector c(1:10). Which R code will swap the values of the 3rd element of X and the 7th element of X?
What is the output for the command: > is.na( NaN ) ?
What does the following R function output? xxx <- c(1, 1, 2, 2, 3, 3, NA, NA); yyy <- c(rep(0, 4), rep(1, 4)); cor(yyy, xxx)
Which R function can be used to produce a simple scatterplot of a numeric vector Y versus a numeric vector X?
All of the following will directly display the help file for the plot() function except:
Given this named vector "X": > X <- c( 5, 10, 1, 20 ); > names( X ) <- c( "a", "b", "c", "d" ); Which operation is valid to show the 2nd and 4th components of X?
Given the command: Z <- array(h, dim=c(3,4,2)), Z[1:24] stands for:
Which will test the hypothesis that two independent Normally distributed random variables A and B have different means?
Which R function outputs the day of the month from X <- "2014-May-15"?