Homework 10
MATH 4830, Spring 2006
due Thurs. April 20


Please read through R-Lab 4: on Estimating a Linear Relationship
The R-Lab 4 web page is at http://legacy.ncsu.edu/ST370/distance/rlab/lab4.html

Note: if you would like to have the dataset climate and the function lplot , you can use the source command at the R command line:

> source("http://www-math.cudenver.edu/~bbailey/4830/climate.R") 
> source("http://www-math.cudenver.edu/~bbailey/4830/lplot.q")
(At the R command line type climate and lplot hit return to see if you have the dataset and function!)
 
  1. At the bottom of R-Lab 4, there is section Own Your Own. Complete Problem 3.
    You should also include R summary and diagnostics plot for the lm object you created.

    The dataset earthq can be read into R using the source command:

    > source("http://www-math.cudenver.edu/~bbailey/4830/earthq.R") 
    
    
  2. R-Lab 4 Own Your Own, Problem 5.
    You should also include R summary and diagnostics plot for the lm object you created.

    The dataset vocab can be read into R using the source command:

    > source("http://www-math.cudenver.edu/~bbailey/4830/vocab.R") 
    
    
  3. p. 197, Problem 19, Meat Processing. Using R.
    You should also include R summary and diagnostics plot for the lm object you created.

    The dataset meat can be read into R using the source command:

    > meat <- read.csv("http://www-math.cudenver.edu/~bbailey/4830/meat.csv", header=T) 
    
    Don't forget to log the hours using log(TIME) in the formula statement.

    For part (b) and (c), the R predict function will return the standard error (and a confidence interval)

    > predict(fit, newdata=data.frame(PH=5), se.fit=T, interval="confidence")
    
    (fit is a lm fitted object)

  4. p. 200, Problem 27, Big Bang II. Using R.
    How do you drop the intercept term? In the formula statement, put a -1, for example, y ~ x -1
    You should also include R summary and diagnostics plot for the lm object you created.

    The dataset bigbang2 can be read into R using the source command:

    > bigbang2 <- read.csv("http://www-math.cudenver.edu/~bbailey/4830/bigbang2.csv", header=T)