Description Usage Arguments Value References Examples

Calculates a ratio test to compare two LC or LT values from two separate probit or logit models. This function is based on the ratio test developed in Wheeler et al. 2006. 10.1897/05-320R.1 which has been suggested as a replacement to the common method of comparing confidence intervals to determine differences.

1 2 3 |

`model_1` |
first model used in the ratio test. Should be an object of either a probit or logit model created using the |

`model_2` |
second model used in the ratio test. Should be an object of either a
probit or logit model created using the |

`percentage` |
either a single value or a vector for given LC or LT percentage desired to compare.
Percentage is the same value used for the argument |

`type` |
Link type needs to be specified to either |

`compare` |
Supply a character string to be used in the output letting the user know what models the LCs or LTs are being compared. Default output is "Model 1 - Model 2". See example. |

`log_base` |
default is |

`log_x` |
default is |

`obj_type` |
default is |

`conf_type` |
default is |

A tibble with `percentage`

for the LC or LT value desired for the above percentage argument, `dose_1`

and `dose_2`

displayed calculated backtransformed or untransformed doses for the desired LC or LT values. Standard Error (`se`

), Z test statistic (`test_stat`

) and `p_value`

determined using Z test statistic as determined using formulas in Wheeler et al. 2006.
.

Wheeler, M.W., Park, R.M., and Bailey, A.J., 2006. Comparing median lethal concentration values using confidence interval overlap or ratio tests, Environ. Toxic. Chem. 25(5), 1441-1444.10.1897/05-320R.1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | ```
# view lamprey_tox data
head(lamprey_tox)
# using glm() to detemine LC values using probit model for May and June
m <- glm((response / total) ~ log10(dose),
data = lamprey_tox[lamprey_tox$nominal_dose != 0, ],
subset = c(month == "May"),
weights = total,
family = binomial(link = "probit"))
j <- glm((response / total) ~ log10(dose),
data = lamprey_tox[lamprey_tox$nominal_dose != 0, ],
subset = c(month == "June"),
weights = total,
family = binomial(link = "probit"))
# now that both May and June models have been made. use ratio_test to
# compare LC50 values or whatever LC values of interest.
ratios <- ratio_test(model_1 = m, model_2 = j, percentage = 50,
compare = "May - June")
# view ratio test results
ratios
# you can also use LC_probit to create the models and use ratio test
m_1 <- LC_probit((response / total) ~ log10(dose), p = c(50, 99),
weights = total,
data = lamprey_tox[lamprey_tox$nominal_dose != 0, ],
subset = c(month == "May"))
j_1 <- LC_probit((response / total) ~ log10(dose), p = c(50, 99),
weights = total,
data = lamprey_tox[lamprey_tox$nominal_dose != 0, ],
subset = c(month == "June"))
ratios_2 <- ratio_test(model_1 = m_1, model_2 = j_1, percentage = 50,
compare = "May - June", obj_type = "df")
ratios_2
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.