Guest User

Untitled

a guest
Jan 14th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.38 KB | None | 0 0
  1. bigAhat <- - 1/n * t(X.int) %*% diag(Y/muhat^2) %*% X.int
  2. bigBhat <- 1/n * t(X.int) %*% diag(1 - 2*Y/muhat + Y^2/muhat^2) %*% X.int
  3. sandvar <- diag(solve(bigAhat) %*% bigBhat %*% solve(t(bigAhat)))
  4. sand.lower.bound <- Bhat - qnorm(0.975)*sqrt(sandvar)
  5. sand.upper.bound <- Bhat + qnorm(0.975)*sqrt(sandvar)
  6. if ((sand.lower.bound < B) && (B < sand.upper.bound)) count.sand = count.sand + 1
Add Comment
Please, Sign In to add comment