Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.47 KB | None | 0 0
  1. library(drc)
  2.  
  3. response <- c(95.23910, 100.23175, 104.52915, 83.71767, 84.91520, 84.99668, 83.75922, 80.79488, 79.44675, 77.64417,
  4. 77.03753, 77.32093, 74.83431, 80.04922, 83.98284, 100.08766, 100.29243, 99.61991, 98.00136, 97.55210,
  5. 96.64827, 70.22343, 81.60977, 72.12828, 98.24016, 102.15456, 99.60528, 81.56161, 77.09402, 73.84495,
  6. 82.32386, 72.07693, 72.32379, 73.78001, 74.79628, 76.88044)
  7.  
  8. dose <- c(0.00000, 0.00000, 0.00000, 212.28178, 204.11203, 216.96099, 435.78343, 435.18381, 432.55421,
  9. 1170.87791, 1176.20623, 1154.72914, 2846.47703, 2827.86970, 2797.45003, 0.00000, 0.00000, 0.00000,
  10. 84.85290, 86.36662, 86.55263, 2568.00710, 2487.90320, 2495.58007, 0.00000, 0.00000, 0.00000,
  11. 321.52090, 492.90972, 607.62896, 737.72523, 812.55645, 1232.82452, 1222.24212, 1451.51058, 1728.99578)
  12.  
  13. data <- data.frame(dose, response)
  14.  
  15. #Attempt 1 - changing the ED function
  16. Pb <- drm(response ~ dose, data = data, fct = LL.4(fixed=c(NA,NA,NA,NA),names=c("Slope", "Lower", "Upper", "ED50"))) #4 param log logistic model
  17. summary (Pb) #upper limit = 100 lower limit = 76
  18. plot(Pb)
  19. ED(Pb,c(10,50), interval="delta") #relative ED value calculated between upper and lower limits
  20. ED(Pb,c(10,50), interval="delta", type=c("absolute")) #setting type to absolute = NaNs produced
  21. ED(Pb,c(10,50), interval="delta", lref = 0) #no change with lref = 0
  22. ED(Pb,c(10,50), interval="delta", lref = 0,type=c("absolute")) #NaNs produced
  23. ED(Pb,c(10,50), interval="delta", bound = TRUE) #no change with Bound = True
  24.  
  25. #Attempt 2 - changing the LL.4 function
  26. Pb.2 <- drm(response ~ dose, data = data, fct = LL.4(fixed=c(NA,0,NA,NA), names=c("Slope", "Lower", "Upper", "ED50")))
  27. summary (Pb.2) #upper limit = 100 lower limit = 76
  28. plot(Pb)
  29. ED(Pb,c(10,50), interval="delta") #no change
  30. ED(Pb,c(10,50), interval="delta", type=c("absolute")) #NaNs produced
  31. ED(Pb,c(10,50), interval="delta", bound = TRUE) #no change
  32.  
  33. 100 - desired Inhibition value
  34.  
  35. Pb.2 <- drm(response ~ dose, data = data, fct = LL.4(fixed=c(NA,NA,100,NA),names=c("Slope", "Lower", "Upper", "ED50"))) #I've fixed the upper to 100%
  36. ED(Pb.2,c(85), interval="delta", type="absolute")
  37.  
  38. Estimated effective doses
  39. Estimate Std. Error Lower Upper
  40. e:1:85 223.048 30.218 161.569 284.528
  41.  
  42. plot(Pb.2)
  43. abline(h=85)
  44. abline(v=223)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement