Nitren {NRAIA}R Documentation

Nitrendipene data

Description

The Nitren data frame has 26 rows and 5 columns from an experiment in cardiology.

Format

This data frame contains the following columns:

log.NIF
a numeric vector giving the log of the NIF concentration
tiss1
a numeric vector giving the reaction in tissue 1.
tiss2
a numeric vector giving the reaction in tissue 2.
tiss3
a a numeric vector giving the reaction in tissue 3.
tiss4
a numeric vector giving the reaction in tissue 4.

Source

Bates and Watts (1998), Nonlinear Regression Analysis and Its Applications, Wiley (Appendix A1.5).

Examples

matplot(Nitren[, 1], Nitren[, -1], las = 1,
    xlab = "log(NIF concentration)",
    ylab = "reaction level",
    main = paste("Nitren data and fitted curves,",
         "omitting zero concentration data"))
## without the data at NIF concentration of zero
options(na.action = na.omit)
fm1 <- nls(tiss1 ~ SSfpl(log.NIF, A, B, xmid, scal), Nitren)
fm1
fm2 <- nls(tiss2 ~ SSfpl(log.NIF, A, B, xmid, scal), Nitren)
fm2
fm3 <- nls(tiss3 ~ SSfpl(log.NIF, A, B, xmid, scal), Nitren)
fm3
fm4 <- nls(tiss4 ~ SSfpl(log.NIF, A, B, xmid, scal), Nitren)
fm4
usr <- par("usr")
xx <- seq(usr[1], usr[2], len = 50)
lines(xx, predict(fm1, list(log.NIF = xx)), col = 1, lty = 2)
lines(xx, predict(fm2, list(log.NIF = xx)), col = 2, lty = 2)
lines(xx, predict(fm3, list(log.NIF = xx)), col = 3, lty = 2)
lines(xx, predict(fm4, list(log.NIF = xx)), col = 4, lty = 2)
title(sub = deparse(fm1$call$formula))
## replacing the data at NIF concentration of zero by a very small value
log.NIF <- Nitren[, 1]
log.NIF[ is.na(log.NIF) ] <- -18
Nitren[, 1] <- log.NIF
matplot(Nitren[, 1], Nitren[, -1], las = 1,
    xlab = "log(NIF concentration)",
    ylab = "reaction level",
    main = paste("Nitren data and fitted curves",
       "- zero concentration recoded as -18"))
fm1 <- nls(tiss1 ~ SSfpl(log.NIF, A, B, xmid, scal), Nitren)
fm1
fm2 <- nls(tiss2 ~ SSfpl(log.NIF, A, B, xmid, scal), Nitren)
fm2
fm3 <- nls(tiss3 ~ SSfpl(log.NIF, A, B, xmid, scal), Nitren)
fm3
fm4 <- nls(tiss4 ~ SSfpl(log.NIF, A, B, xmid, scal), Nitren)
fm4
usr <- par("usr")
xx <- seq(usr[1], usr[2], len = 50)
lines(xx, predict(fm1, list(log.NIF = xx)), col = 1, lty = 2)
lines(xx, predict(fm2, list(log.NIF = xx)), col = 2, lty = 2)
lines(xx, predict(fm3, list(log.NIF = xx)), col = 3, lty = 2)
lines(xx, predict(fm4, list(log.NIF = xx)), col = 4, lty = 2)
title(sub = deparse(fm1$call$formula))

[Package NRAIA version 0.9-7 Index]