Drm function for dose response curve

Viewed 34

I am trying to make a dose-receptive curve (i.e a titration curve). The data is

structure(list(Dilution = c(300L, 900L, 2700L, 8100L, 24300L, 
    72900L, 218700L, 300L, 900L, 2700L, 8100L, 24300L, 72900L, 218700L, 
    300L, 900L, 2700L, 8100L, 24300L, 72900L, 218700L, 300L, 900L, 
    2700L, 8100L, 24300L, 72900L, 218700L, 300L, 900L, 2700L, 8100L, 
    24300L, 72900L, 218700L, 300L, 900L, 2700L, 8100L, 24300L, 72900L, 
    218700L, 300L, 900L, 2700L, 8100L, 24300L, 72900L, 218700L), 
    X..bound = c(92.43, 92.95, 92.26, 86.55, 67.49, 21.86, 0.72, 
    89.57, 87.84, 82.35, 65.84, 24.18, 3.56, 0.32, 91.63, 90.57, 
    87.22, 77.03, 39.52, 5.39, 1.24, 93.51, 93.56, 90.33, 80.49, 
    38.97, 4.7, 0.93, 95.37, 94.44, 91.24, 77.74, 28.76, 2.14, 
    0.15, 0.01, 0, 0, 0, 0, 0, 0, 0.01, 0, 0.01, 0, 0, 0, 0), 
    Sample = c("CoV77-39 1mer 0DA", "CoV77-39 1mer 0DA", "CoV77-39 1mer 0DA", 
    "CoV77-39 1mer 0DA", "CoV77-39 1mer 0DA", "CoV77-39 1mer 0DA", 
    "CoV77-39 1mer 0DA", "CoV77-39 5mer 0DA", "CoV77-39 5mer 0DA", 
    "CoV77-39 5mer 0DA", "CoV77-39 5mer 0DA", "CoV77-39 5mer 0DA", 
    "CoV77-39 5mer 0DA", "CoV77-39 5mer 0DA", "CoV77-39 5mer 2DA GGG", 
    "CoV77-39 5mer 2DA GGG", "CoV77-39 5mer 2DA GGG", "CoV77-39 5mer 2DA GGG", 
    "CoV77-39 5mer 2DA GGG", "CoV77-39 5mer 2DA GGG", "CoV77-39 5mer 2DA GGG", 
    "CoV77-39 5mer 2DA GDGDG", "CoV77-39 5mer 2DA GDGDG", "CoV77-39 5mer 2DA GDGDG", 
    "CoV77-39 5mer 2DA GDGDG", "CoV77-39 5mer 2DA GDGDG", "CoV77-39 5mer 2DA GDGDG", 
    "CoV77-39 5mer 2DA GDGDG", "CoV77-39 5mer 2DA GDG", "CoV77-39 5mer 2DA GDG", 
    "CoV77-39 5mer 2DA GDG", "CoV77-39 5mer 2DA GDG", "CoV77-39 5mer 2DA GDG", 
    "CoV77-39 5mer 2DA GDG", "CoV77-39 5mer 2DA GDG", "CoV77-39 HA", 
    "CoV77-39 HA", "CoV77-39 HA", "CoV77-39 HA", "CoV77-39 HA", 
    "CoV77-39 HA", "CoV77-39 HA", "CoV77-39 WT", "CoV77-39 WT", 
    "CoV77-39 WT", "CoV77-39 WT", "CoV77-39 WT", "CoV77-39 WT", 
    "CoV77-39 WT")), class = "data.frame", row.names = c(NA, 
    -49L))

I then run try<-drm(X..bound~Dilution,data=Titration.8.31,Sample,robust="mean",fct=LL.4()) and then this generates a curve after I run

plot(try,col=c("dodgerblue2", "#E31A1C", "green4", "#6A3D9A", "#FF7F00", "black", "gold1", "skyblue2", "palegreen2", "#FDBF6F", "gray70", "maroon", "orchid1", "darkturquoise", "darkorange4", "brown"),lty=c(1,1,1,1,1,5,5))

which looks great because the lines of best fit don't go below 0. However, I am not sure how to change the numerical axis; more specifically the x-axis. I am trying to make the x axis label with 10^.x---I know how to do this in ggplot by using

+scale_x_continuous(trans = "log10",breaks = trans_breaks("log10", function(x) 10^x),labels = trans_format("log10", math_format(10^.x)), minor_breaks = 10^(seq(0, 7, by = 0.25)))

but this won't work with the plot function. Is there a way to make my x-axis label a 10^x# instead of the odd labeling/spacing it has now in the attached image? Or is there a way to do this in ggplot (preferred)?graph with weird x label

0 Answers
Related