Skip to content

Instantly share code, notes, and snippets.

@erykml
Created June 3, 2019 19:24
Show Gist options
  • Select an option

  • Save erykml/4d4753be11e80da0d363f8369a309e87 to your computer and use it in GitHub Desktop.

Select an option

Save erykml/4d4753be11e80da0d363f8369a309e87 to your computer and use it in GitHub Desktop.
%%R
library(tseries)
library(olsrr)
qqnorm(lin_reg$residuals)
# or
df_resid <- data.frame(resid = lin_reg$residuals)
p <- ggplot(df_resid, aes(sample = resid))
p + stat_qq() + stat_qq_line()
jarque.bera.test(lin_reg$residuals)
ks.test(as.numeric(lin_reg$residuals), "pnorm")
ols_test_normality(lin_reg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment