Producing Dose Response Curves in R
HTML-код
- Опубликовано: 8 фев 2025
- In this tutorial we will work through the entire process of performing a dose response curve analysis in R. We start by importing, cleaning and reformatting the data. We then do some initial plotting and exploration. After adding some normalisation to the data we perform the curve fitting and then check the model to ensure that it matches the data well.
Really thorough explanation. When I followed it step for step, it worked for me. Thank you!
This is a fantastic explanation. Thank you!
Excellent tutorial, Thank you very much
Perfect explanation, thank you very much for this video!
This is an excellent tutorial. Can one use glm (binomial family) instead to determine EC50 or LC50, as the case may be?
thanks for your explanation
Can I please ask, how do you determine the dose that corresponds to IC10 or IC20 etc?
I am getting an error for the predict model. Could you please help?
one last thing, anyone knows how to add error bars to the final plot? When I try to add the error bars by combining the earlier plot I get Error in geom_line(data = predicted_data, aes(x = dose, y = prediction)) :
here is an answer I came up with
```{r}
drc_per_condition %>%
ggplot(aes(x=Dose, y=response, colour=condition))+
geom_point()+
geom_errorbar(aes(ymin=response-sem, ymax=response+sem), width=.2) +
scale_x_log10() +
geom_line(
data=predicted_data,
aes(x=dose, y=prediction)
)
```
What if you want error bars on the final curve?
Did you figure this out? I tried but can’t. Keep getting an error
@@juanpdiddy not yet, sorry
@@soniakhan9472 Thanks, it seems like adding ymin and ymax like in an earlier plot should work but I keep getting an error that response is not found yet if I don't have ymin or ymax in the expression, it finds response just fine...so annoying.
@@soniakhan9472 I figured it out. The problem was due to coloring, aestetics for some reason. The following chuck, does the curve fitting and adds error bars to the final plot. Hope it works for you.
```{r}
drc_per_condition %>%
ggplot(aes(x=Dose, y=response, colour=condition))+
geom_point()+
geom_errorbar(aes(ymin=response-sem, ymax=response+sem), width=.2) +
scale_x_log10() +
geom_line(
data=predicted_data,
aes(x=dose, y=prediction)
)
```