daily pastebin goal
71%
SHARE
TWEET

Untitled

a guest Oct 12th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. acf(rank(lm(x ~ I(1:n))$resid), lag.max=(n-1), plot=FALSE)$acf[-1] -> ro
  2.    
  3. qnorm((1+ci)/2)/sqrt(n) -> sig
  4. rep(NA,length(ro)) -> rof
  5. for (i in 1:(length(ro))) {
  6. if(ro[i] > sig || ro[i] < -sig) {
  7. rof[i] <- ro[i]
  8. } else {
  9. rof[i] = 0
  10. }
  11. }
  12.    
  13. acf(rank(x),lag.max = 3) -> ro
RAW Paste Data
Top