Learn R Programming

NISTnls (version 0.9-13)

MGH10: More, Gabrow and Hillstrom example 10

Description

The MGH10 data frame has 16 rows and 2 columns.

Arguments

Format

This data frame contains the following columns:
y
A numeric vector of response values.
x
A numeric vector of input values.

Source

Meyer, R. R. (1970). Theoretical and computational aspects of nonlinear regression. In Nonlinear Programming, Rosen, Mangasarian and Ritter (Eds). New York, NY: Academic Press, pp. 465-486.

Details

This problem was found to be difficult for some very good algorithms.

See More, J. J., Garbow, B. S., and Hillstrom, K. E. (1981). Testing unconstrained optimization software. ACM Transactions on Mathematical Software. 7(1): pp. 17-41.

Examples

Run this code
Try <- function(expr) if (!inherits(val <- try(expr), "try-error")) val
plot(y ~ x, data = MGH10)
## check plot on log scale for shape
plot(y ~ x, data = MGH10, log = "y")
## starting values for this run are ridiculous
Try(fm1 <- nls(y ~ b1 * exp(b2/(x+b3)), data = MGH10, trace = TRUE,
           start = c(b1 = 2, b2 = 400000, b3 = 25000)))
Try(fm1a <- nls(y ~ b1 * exp(b2/(x+b3)), data = MGH10,
                trace = TRUE, alg = "port",
                start = c(b1 = 2, b2 = 400000, b3 = 25000)))
Try(fm2 <- nls(y ~ b1 * exp(b2/(x+b3)), data = MGH10, trace = TRUE,
           start = c(b1 = 0.02, b2 = 4000, b3 = 250)))
Try(fm2a <- nls(y ~ b1 * exp(b2/(x+b3)), data = MGH10,
                trace = TRUE, alg = "port",
                start = c(b1 = 0.02, b2 = 4000, b3 = 250)))
Try(fm3 <- nls(y ~ exp(b2/(x+b3)), data = MGH10, trace = TRUE,
               start = c(b2 = 400000, b3 = 25000),
               algorithm = "plinear"))
Try(fm4 <- nls(y ~ exp(b2/(x+b3)), data = MGH10, trace = TRUE,
           start = c(b2 = 4000, b3 = 250),
           algorithm = "plinear"))

Run the code above in your browser using DataLab