# Linear Logistic Regression model

I am working on an exercise question, and I am a bit stuck unsure on how to proceed. I was given the data below and asked to graphically display the relationship between dose and kill rate.

Using R, I created a data frame to represent the values from the table with the following commands,

dose <- c("1", "2", "3", "4", "5", "6")
insecticide <- c("1", "2", "3")
data.df <- expand.grid(dose=dose, insecticides=insecticide)

kills <- c(3, 5, 19, 19, 24, 35,
2, 14, 20, 27, 41, 40,
28, 37, 46, 48, 48, 50)

total_beetles <- c(50, 49, 47, 38, 49, 50,
50, 49, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50)

beetles.df <- as.data.frame(data.df) %>%
mutate(kills = kills, beetles=total_beetles,
killrate=kills/beetles)


I then displayed the relationship between dose and kill rate graphically using a facet wrap to view the insecticides as well.

ggplot(data=beetles.df, mapping=aes(x=dose, y = killrate,
color=insecticides)) + geom_point() +
facet_wrap(vars(insecticides))


Now for this exercise question, I was asked to, plot the linear logistic fitted curve for each of the insecticides plus the combination, but I am not sure I can plot a logistic curve in this case since wouldn't my response variable have to be binary to apply a logistic curve. I am just a bit confused maybe on the wording of this question.

• I don't see where you fit anything in this code. Did you omit part of it?
– whuber
Mar 19 at 18:31