Chloride: Chloride ion concentrations

Description Format Details Source Examples

Description

The Chloride data frame has 54 rows and 2 columns representing measurements of the chloride ion concentration in blood cells suspended in a salt solution.

Format

This data frame contains the following columns:

conc

A numeric vector giving the chloride ion concentration (%).

Time

A numeric vector giving the time of the concentration measurement (min).

Details

There is a noticeable serial correlation in the residuals from a fit of a simple asymptotic regression model to these data, as described in section 3.8 of Bates and Watts (Wiley, 1988). We can either use a modified model with nls, as described in the reference, or model it directly with the gnls function.

Source

Bates and Watts (1998), Nonlinear Regression Analysis and Its Applications, Wiley (Appendix A4.1).

Originally from Sredni (1970), Ph.D. Thesis, University of Wisconsin - Madison.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Fit nonlinear regression model
(fm1 <- nls(conc ~ Asym*(1 - prop*exp(-exp(lrc)*Time)), data = Chloride,
           start = c(Asym = 50, prop = 0.6, lrc = log(0.25)), trace = TRUE))
plotfit(fm1, xlab = "Time (min)", ylab = "Chloride ion concentration (%)")
plot(resid(fm1) ~ fitted(fm1),  # plot shows patterns in the residuals
     xlab = "Least squares fitted values",
     ylab = "Least squares residuals",
     main = "Residuals from least squares fit")
abline(h = 0, lty = 2, lwd = 0)
plot(resid(fm1)[-1], resid(fm1)[-length(resid(fm1))],  # lag plot
     xlab = "Least squares residual",
     ylab = "Lagged least squares residual",
     main = "Lag plot of least squares residuals")
abline(h = 0, lty = 2, lwd = 0)
abline(v = 0, lty = 2, lwd = 0)
## Use conditional linearity in another formulation of the model
(fm2 <- nls(conc ~ cbind(1, exp(-exp(lrc)*Time)), data = Chloride,
           start = c(lrc = log(0.25)), algorithm = "plinear", trace = TRUE))
## Using a self-Starting model in yet another formulation
(fm3 <- nls(conc ~ SSasympOff(Time, Asym, c0, lrc), data = Chloride))

NRAIA documentation built on May 2, 2019, 4:52 p.m.

Related to Chloride in NRAIA...