when X′X and X′y are given. 3 Some Other Matrix Commands The same X matrix could also have been created in the following manner: # create a long vector with 50 1's and then the x values x <- c(1:50) x_temp <- c(rep(1,n),x) # take that long collection of numbers and reshape it into a matrix X_alt <- matrix(x_temp,50,2) # with 50 rows and 2 columns Is the matrix of the right shape?
The only presentation close to what I wanted was Chapter 15 of The Statistical Sleuth (2002) by Ramsey and Schafer. However, this chapter is limited to what we will come to denote the AR(1) model and lacks the mathematical details to go further. There is a second motivation for the book. Statisticians lament the misuse and poor use of statistical methods in nonstatistical journals. ” In fact, most statisticians are too busy getting tenure and developing methods magnitudes of sophistication beyond what colleagues in nonstatistical journals are doing.
Basic Data Analysis for Time Series with R by DeWayne R. Derryberry