Skip to content

Instantly share code, notes, and snippets.

@felixholub
Created June 19, 2019 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felixholub/84585694020abb3458cd8c72dfdfa55e to your computer and use it in GitHub Desktop.
Save felixholub/84585694020abb3458cd8c72dfdfa55e to your computer and use it in GitHub Desktop.
# Define F-Test function: w = waldtest([1 -1 0 0], rr1.coef, rr1.vcov)
function waldtest(R, β, Σ)
wald = (R * β)' * inv(R * Σ * R') * (R * β)
q = size(R)[1]
pval = 1 - cdf(Chisq(q), wald)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment