Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(drc)
- response <- c(95.23910, 100.23175, 104.52915, 83.71767, 84.91520, 84.99668, 83.75922, 80.79488, 79.44675, 77.64417,
- 77.03753, 77.32093, 74.83431, 80.04922, 83.98284, 100.08766, 100.29243, 99.61991, 98.00136, 97.55210,
- 96.64827, 70.22343, 81.60977, 72.12828, 98.24016, 102.15456, 99.60528, 81.56161, 77.09402, 73.84495,
- 82.32386, 72.07693, 72.32379, 73.78001, 74.79628, 76.88044)
- dose <- c(0.00000, 0.00000, 0.00000, 212.28178, 204.11203, 216.96099, 435.78343, 435.18381, 432.55421,
- 1170.87791, 1176.20623, 1154.72914, 2846.47703, 2827.86970, 2797.45003, 0.00000, 0.00000, 0.00000,
- 84.85290, 86.36662, 86.55263, 2568.00710, 2487.90320, 2495.58007, 0.00000, 0.00000, 0.00000,
- 321.52090, 492.90972, 607.62896, 737.72523, 812.55645, 1232.82452, 1222.24212, 1451.51058, 1728.99578)
- data <- data.frame(dose, response)
- #Attempt 1 - changing the ED function
- 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
- summary (Pb) #upper limit = 100 lower limit = 76
- plot(Pb)
- ED(Pb,c(10,50), interval="delta") #relative ED value calculated between upper and lower limits
- ED(Pb,c(10,50), interval="delta", type=c("absolute")) #setting type to absolute = NaNs produced
- ED(Pb,c(10,50), interval="delta", lref = 0) #no change with lref = 0
- ED(Pb,c(10,50), interval="delta", lref = 0,type=c("absolute")) #NaNs produced
- ED(Pb,c(10,50), interval="delta", bound = TRUE) #no change with Bound = True
- #Attempt 2 - changing the LL.4 function
- Pb.2 <- drm(response ~ dose, data = data, fct = LL.4(fixed=c(NA,0,NA,NA), names=c("Slope", "Lower", "Upper", "ED50")))
- summary (Pb.2) #upper limit = 100 lower limit = 76
- plot(Pb)
- ED(Pb,c(10,50), interval="delta") #no change
- ED(Pb,c(10,50), interval="delta", type=c("absolute")) #NaNs produced
- ED(Pb,c(10,50), interval="delta", bound = TRUE) #no change
- 100 - desired Inhibition value
- 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%
- ED(Pb.2,c(85), interval="delta", type="absolute")
- Estimated effective doses
- Estimate Std. Error Lower Upper
- e:1:85 223.048 30.218 161.569 284.528
- plot(Pb.2)
- abline(h=85)
- abline(v=223)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement