Advertisement
singmann

evsd_dube_experiment2

Aug 19th, 2014
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.87 KB | None | 0 0
  1. require(MPTinR)
  2.  
  3. evsd_c_shift <- "
  4. 1-pnorm(c-mu)
  5. pnorm(c-mu)
  6.  
  7. 1-pnorm(c)
  8. pnorm(c)
  9.  
  10. 1-pnorm(c+shift-mu)
  11. pnorm(c+shift-mu)
  12.  
  13. 1-pnorm(c+shift)
  14. pnorm(c+shift)
  15. "
  16.  
  17. evsd_mu_shift <- "
  18. 1-pnorm(c-mu)
  19. pnorm(c-mu)
  20.  
  21. 1-pnorm(c)
  22. pnorm(c)
  23.  
  24. 1-pnorm(c-(mu+shift))
  25. pnorm(c-(mu+shift))
  26.  
  27. 1-pnorm(c-(0+shift))
  28. pnorm(c-(0+shift))
  29. "
  30.  
  31. dube2 <- c(.86, .14, .61, .39, .68, .32, .32, .68)
  32.  
  33. cs <- fit.model(dube2, textConnection(evsd_c_shift), lower.bound=c(-Inf, 0, 0), upper.bound=Inf)
  34.  
  35. mus <- fit.model(dube2, textConnection(evsd_mu_shift), lower.bound=c(-Inf, 0, -Inf), upper.bound=Inf)
  36.  
  37. cs$goodness.of.fit
  38. mus$goodness.of.fit
  39.  
  40. cs$parameters
  41. mus$parameters
  42.  
  43. round(gen.predictions(c(c = -.25, mu = .87, shift = .69), model.filename=textConnection(evsd_c_shift)), 2)
  44. round(gen.predictions(c(c = -.25, mu = .87, shift = -.69), model.filename=textConnection(evsd_mu_shift)), 2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement