Louise Lynn Halle
Louise Lynn Halle

Reputation: 3

R program Std dev. in LC50 plot using drc package

I am pretty new to this R programming and more or less only know how to make EC50 and LC50 calculations and plots. My question is: how do I get the standard deviations for each concentration (0,1,5,10,15,20 mg/L) to show up on the plot?

This is my code:

    72 timer LC50
> LC50_72hR<-read.csv(file.choose(),dec=".",sep=" ", header=TRUE)
> LC50_72hR
   Concentration Total Dead
1              0    20    1
2              0    20    1
3              0    20    1
4              1    20    4
5              1    20    2
6              1    20    5
7              5    20    7
8              5    20   11
9              5    20   10
10            10    20   11
11            10    20   16
12            10    20   15
13            15    20   16
14            15    20   18
15            15    20   20
16            20    20   19
17            20    20   20
18            20    20   20
> LC50_72hR<-drm(Dead/Total~Concentration,weights=Total,fct=LL.2(),type="binomial",data=LC50_72hR)
> summary(LC50_72hR)

Model fitted: Log-logistic (ED50 as parameter) with lower limit at 0 and upper limit at 1 (2 parms)

Parameter estimates:

              Estimate Std. Error  t-value p-value
b:(Intercept) -1.40548    0.16443 -8.54734       0
e:(Intercept)  4.09353    0.49499  8.26987       0
> plot(LC50_72hR)
> ED(LC50_72hR,c(10,50,90))

Estimated effective doses

     Estimate Std. Error
1:10  0.85734     0.2242
1:50  4.09353     0.4950
1:90 19.54538     3.2559

I found this manual for the package (https://cran.r-project.org/web/packages/drc/drc.pdf) but I cannot find any guide to put std dev on my plot.

Hope you guys can help!

Upvotes: 0

Views: 1318

Answers (1)

nik
nik

Reputation: 2584

You should have a x and a y. I see in your regression that you divided dead/total means this is one variable (lets call it x) and you have another variable concentration. when you want to plot this, if this is right then simply use this to plot your sd in your data Add error bars to show standard deviation on a plot in R

Upvotes: 1

Related Questions