$30.99
Directions
Using RMarkdown in RStudio, complete the following questions. Launch RStudio and open a new RMarkdown file and save it on your working directory as a name.Rmd file. At the end of the activity, knit your document to pdf generated from RMarkdown+Knitr and submit your homework on the Blackboard.
If you have questions, please post them on the lesson discussion board.
All Two questions are mandatory.
R code and output must be clearly shown.
Homework submitted after the due date will attract a penalty of 10 points per day after the due date.
1(a). Let A be defined as follows:
1
A = 1
1
5
0
0
0
5
5
(i) are the column vectors of A linearly dependent?
(ii) What is the rank of A?
(iii) What must be the determinant of A? (iv) Find the trace of A.
1(b). Let B be defined as follows:
5
B = 4
1
1
0
9
3
5
6
Page -1- of 2
(i) are the column vectors of B linearly dependent?
(ii) What is the rank of B?
(iii) Calculate the determinant of B.
(iv) Find the trace of B.
(v) Find the inverse of B.
2. The data below show, for a consumer finance company operating in six cities, the number of competing loan companies in the city (X) and the number per thousand of company’s loans made in that city that are currently delinquent (Y ):
## Y X
## 1 16 4 ## 2 5 1 ## 3 10 2
## 4 15 3
## 5 13 3 ## 6 22 4
Assume that the first-order regression model Y = Xβ + is applicable. Using the matrix methods, obtain the following:
(i) YTY
(ii) XTX
(iii) XTY
(iv) (XTX)−1
(v) a vector of estimated regression coefficients βˆ
(vi) a vector of residuals e
(vii) SSR
(viii) SSE
(ix) estimated variance-covariance matrix of βˆ