fitlindr: Fit dose-response when dose is linear scale.

Description Usage Arguments Value Examples

View source: R/fitlindr.R

Description

fitlindr uses the nlsLM function from the minpack.lm package to fit a model formula to nonlinear response data. The formula is based upon the general hyperbolic function: y/ymax=x^h/(x^h+k^h), where ymax = yhi - ylo. k, ylo, yhi and h are start list parameters for nlsLM. The regression formula is 'y ~ ylo + (yhi - ylo)*x^h/(x^h + k^h)'

Usage

1
fitlindr(x, y, data, k, ylo, yhi, h, weigh)

Arguments

x

a vector of linear scale values, usually dose or concentration.

y

a vector of y values for x, usually responses.

data

a dataframe with x and y.

k

estimates the value of x that yields y/ymax = 0.5, usually ED50 or EC50.

ylo

estimates the lowest asymptotic y value, in response units.

yhi

estimates highest asymptotic value, in response units.

h

the Hill slope, a unitless slope factor; -1 > h > 1 is steeper, -1 < h < 1 is shallower. Use negative value for downward sloping response.

weigh

chooses regression weighting by 1/y^2. Default = FALSE.

Value

nls

Examples

1
2
## aorta contraction by phenylephrine doses
fitlindr(x=nM_PE, y=mN, data=aoc, k=100, ylo=0, yhi=50, h=1, weigh=TRUE)

TJMurphy/nlfitr documentation built on March 18, 2021, 12:33 p.m.