## Test response variable for normality
X <- jb.test(data.income$loginc)
X
## Estimate linear model
income.est <- ols(loginc ~ logsave + logsum, data = data.income)
## Test residuals for normality, print details
jb.test(income.est, details = TRUE)
## Equivalent test
jb.test(loginc ~ logsave + logsum, data = data.income, details = TRUE)
## Plot the test result
plot(X)
Run the code above in your browser using DataLab