knitr::opts_chunk$set(
  message = FALSE,
  digits = 3,
  collapse = TRUE,
  comment = "#>"
  )
options(digits = 3)

The Hill equation is a special dose-response model. Below we demonstrate how to specifically fit this model by hillFit() function.

We first prepare standardized data where the response is scaled to between 0 and 1. A generic plot function is implemented for the fitted object.

library(drexplorer2)
data(ryegrass)

## prepare standardized data
sdat <- prepDRdat(drMat = ryegrass[, c(2, 1)],
                  alpha = 0.01, fitCtr = FALSE, standardize = TRUE)$dat

## fit Hill equation
fit_hill <- hillFit(d = sdat$dose, y = sdat$response)

plot(fit_hill)
fit_hill[1:length(fit_hill)]


lshen1/drexplorer2 documentation built on June 2, 2020, 9:27 p.m.