BOD2: Biochemical Oxygen Demand

Description Format Source Examples

Description

The BOD2 data frame has 8 rows and 2 columns giving the biochemical oxygen demand versus time in an evaluation of water quality.

Format

This data frame contains the following columns:

Time

A numeric vector giving the time of the measurement (days).

demand

A numeric vector giving the biochemical oxygen demand (mg/l).

Source

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

Originally from Marske (1967), M.Sc. Thesis, University of Wisconsin - Madison.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
str(BOD2)
# simplest form of fitting a first-order model to these data
(fm1 <- nls(demand ~ A*(1-exp(-exp(lrc)*Time)), data = BOD2,
   start = c(A = 2.2, lrc = log(0.25))))
coef(fm1)
# using the plinear algorithm
(fm2 <- nls(demand ~ (1-exp(-exp(lrc)*Time)), data = BOD2,
   start = c(lrc = log(0.25)), algorithm = "plinear", trace = TRUE))
# using a self-starting model
(fm3 <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD2))
plotfit(fm3, xlab = "Time (days)",
        ylab = "Biochemical Oxygen Demand")


## End(Not run)

erlisR/iLaplaceExamples documentation built on May 16, 2019, 8:48 a.m.