Hepaga {mffSM} | R Documentation |
Pharmacokinetics/pharmacodynamics data from hematology useful for excercises in non-linear regression.
The relationship between the response Y
and the explanatory
variable x might be modelled as
EY = -log(a) + log(log(1 + x/b)),
where a and b are unknown parameters.
data(Hepaga)
A data.frame
with 12 rows and the following variables.
explanatory variable
response
data(Hepaga) summary(Hepaga) ### Plot data plot(y~x, col="red3", bg="orange", pch=22, data=Hepaga) ### Non-linear regression rfce1 <- deriv3(~-log(a) + log(log(1+x/b)), namevec=c("a", "b"), function.arg=function(x, a, b){}) m1 <- nls(y~rfce1(x, a, b), start=list(a=1, b=1), data=Hepaga) summary(m1) ### Estimated regression function xx <- data.frame(x=seq(min(Hepaga$x), max(Hepaga$x), length=50)) pm1 <- predict(m1, xx) plot(y~x, col="red3", bg="orange", pch=22, data=Hepaga) lines(xx$x, pm1, col="red4", lwd=2) ### Alternative parametrization rfce2 <- deriv3(~-log(a) + log(log(1 + a*x/e)), namevec=c("a", "e"), function.arg=function(x, a, e){}) m2 <- nls(y~rfce2(x, a, e), start=list(a=1, e=1), data=Hepaga) summary(m2)