r - Comparison of differences or ratios (relative potencies) of ED50 in relation to a reference treatment in drc -


i analysing data ecotoxicological experiments using package drc. have 3 treatments named "0", "1" , "2" (see example below), treatment "0" reference. dataframe has data on chemical concentration (conc) , fraction of mortality (death) treatments. fitted ll.4 model using drm , calculated ed50 values using ed.

in next step of analysis, compared ratio , difference of ed50 between 3 treatments. using compparm able calculate estimates ratios of ed50 treatments ("1"/"2", "1"/"0" , "2"/"0") , differences ("1"-"2", "1"-"0" , "2"-"0").

according drc documentation, compparm produces

"a matrix columns containing estimates, estimated standard errors, values of t-statistics , p-values null hypothesis ratio equals 1 or difference equals 0 (depending on operator argument)."

now know if ratios or differences of ec50 treatments "1" , "2" different reference treatment "0". in other words, using example below, know if ec50 ratios "1"/"0" , "2"/"0" different. in case of differences between ec50 values, know if absolute differences "1"-"0" , "2"-"0" significant. please note in case of differences, estimate may negative, , reason interested in absolute difference.

below code replicate analysis far.

thanks!

# libraries library(drc) library(multcomp) library(sandwich) library(lmtest)  # dataframe treat<-c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) conc<-c(0,0.6,1,1.3,1.6,2.2,0,0.6,1,1.3,1.6,2.2,0,0.6,1,1.3,1.6,2.2,0,0.6,1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8,1,0,0,0.4,0.6,1,1,0.2,0.2,0.4,0.6,1,1,0.2,0,0,0.4,0.6,1,0,0,0.2,0.2,0.8,1,0,0.2,0.2,0.2,0.8,1,0,0,0,0.2,0.8,1,0.2,0.2,0.2,0.2,0.6,1,0,0.2,0.2,0.2,0.8,1,0,0.2,0.2,0.2,1,1,0,0.4,0.4,0.2,0.6,1,0,0.2,0.2,0.2,0.6,1,0,0,0.2,0.2,1,1,0,0.2,0,0.2,0.8,1,0,0.2,0,0.2,0.8,1) data <- data.frame(treat,conc,death)  # model m1 <- drm(death ~ conc                  , treat                  , data=data                  , fct = ll.4(fixed = c(na, 0, 1, na)                               ,names = c("slope", "lower limit", "upper limit", "ed50")) ) summary(m1)  # estimate effective doses 50 ed.m1 <- ed(m1, 50, interval = "delta", lref = "0", uref = "1")  # calculate relative potencies between dose-response curves compparm(m1, "ed50", "/", vcov = sandwich, display = true)  # calculate difference of ed50 between dose-response curves compparm(m1, "ed50", "-", vcov = sandwich, display = true) 


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -