This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: stocks5_period1.txt", header=TRUE) #Regression of r11 on rsp1 (index): q <- lm(a1$r11 ~ a1$rsp1) #Summary of the regression above: summary(q) #List the names of the results in object q: names(q) #Get the estimates of alpha and beta: q$coefficients q$coefficients #List the residuals: q$residuals #Get the estimate of the variance of the error term (MSE): sum(q$residuals^2)/(nrow(a1)-2) #Another way: summary(q)$sigma^2 #variance-covariance matrix of the estimates of the main parameters #of the model: vcov(q) #Get the variance of the estimate of beta: vcov(q)[2,2] #Another way: summary(q)$coefficients^2 2...
View Full Document
This note was uploaded on 06/02/2011 for the course STATS 183 taught by Professor Nicolas during the Spring '11 term at UCLA.
- Spring '11