p12.12: Data Set for Problem 12-12

Description Usage Format Source Examples

Description

The p12.12 data frame has 18 observations on an chemical experiment. A nonlinear model relating concentration to reaction time and temperature with an additive error is proposed to fit these data.

Usage

1

Format

This data frame contains the following columns:

x1

reaction time (in minutes)

x2

temperature (in degrees Celsius)

y

concentration (in grams/liter)

Source

Montgomery, D.C., Peck, E.A., and Vining, C.G. (2001) Introduction to Linear Regression Analysis. 3rd Edition, John Wiley and Sons.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(p12.12)
attach(p12.12)
# fitting the linearized model 
logy.lm <- lm(I(log(y))~I(log(x1))+I(log(x2)))
summary(logy.lm)
plot(logy.lm, which=1)  # checking the residuals
# fitting the nonlinear model
y.nls <- nls(y ~ theta1*I(x1^theta2)*I(x2^theta3), start=list(theta1=.95, 
theta2=.76, theta3=.21))
 summary(y.nls)
 plot(resid(y.nls)~fitted(y.nls)) # checking the residuals 

Example output

Attaching package: 'MPV'

The following object is masked from 'package:datasets':

    stackloss


Call:
lm(formula = I(log(y)) ~ I(log(x1)) + I(log(x2)))

Residuals:
     Min       1Q   Median       3Q      Max 
-0.32083 -0.07250 -0.02308  0.07307  0.31541 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.05442    0.56704  -0.096    0.925    
I(log(x1))   0.76210    0.08146   9.355 1.19e-07 ***
I(log(x2))   0.21289    0.12996   1.638    0.122    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.1568 on 15 degrees of freedom
Multiple R-squared:  0.8574,	Adjusted R-squared:  0.8384 
F-statistic:  45.1 on 2 and 15 DF,  p-value: 4.523e-07


Formula: y ~ theta1 * I(x1^theta2) * I(x2^theta3)

Parameters:
       Estimate Std. Error t value Pr(>|t|)    
theta1  0.87027    0.39437   2.207   0.0433 *  
theta2  0.78324    0.08125   9.639 8.08e-08 ***
theta3  0.22713    0.10068   2.256   0.0394 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.8446 on 15 degrees of freedom

Number of iterations to convergence: 3 
Achieved convergence tolerance: 1.994e-06

MPV documentation built on June 8, 2018, 1:03 a.m.