Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: tak30 on May 22nd, 2012  |  syntax: R  |  size: 0.33 KB  |  hits: 51  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2. set.seed(12345)
  3. Y1 <-rbinom(n=500,size=1,prob=0.8)
  4. Y2 <-rbinom(n=500,size=1,prob=0.9)
  5. Y3 <-rbinom(n=500,size=1,prob=0.6)
  6. Y4 <-rbinom(n=500,size=1,prob=0.5)
  7. t1 <- Y1|Y2
  8. t2 <- Y3|Y4
  9. t3 <- Y1|Y2
  10. t4 <-rbinom(n=500,size=1,prob=0.7)
  11. CIRCUITO <- t3&t4  
  12. prop <- sum(CIRCUITO)/500 # Cambia la semilla la proporcion
  13. print(prop)