Docsity

Statistical Methods for Bioscience I - Practice Assignment 1 | HORT 572, Assignments of Data Analysis & Statistical Methods

Toggle sidebar
bg1
Stat/F&W/Hort 572 Ane January 22, 2009
Assignment #1 — Due Friday, Jan. 30, 2009, by 4 pm
Turn in lecture, discussion, or to your TA’s mailbox. Please circle the discussion section you expect to pick up
this assignment:
311 312 313 314
1. Download the file fev.txt from the course webpage. This data set contains 654 observations with 5 variables:
fev (forced expiratory volume, in liters), ht (height in inches), age (in years), sex and smoke. In R, use
the read.table function to read the cows.txt file into R. Use Ror the software of your choice to do this
assignment.
(a) Plot the forced expiratory volume versus height. Use different colors or point characters for the smoke
categories. The options pch=as.numeric(smoke) or col=smoke can be useful with the plot function
in R. Describe the relationship between these variables.
(b) Fit a simple linear model to predict fev using height as a predictor. Write the fitted model in the form
(fev in ??) = ?? + ?? (height in ??)
In what units are the slope and intercept?
(c) For this linear model, plot the residuals versus the predicted fev values. What assumptions of the
linear regression can be assessed with this plot, and do these assumptions seem to be met here?
2. Download the file cows.txt from the course webpage. The file cows.info is a plain text file that contains
information about the variables in the data set cows.txt. In R, use the read.data function to read the
cows.txt file into R.
(a) Plot the milk yield versus the initial weight of the cows. Describe the relationship between the vari-
ables. What method from last semester may be appropriate to analyze the relationship between these
variables?
(b) Draw side-by-side boxplots of milk yield versus treatment. Describe the relationship between these
variables. What method from last semester may be appropriate to analyze the relationship between
these variables?
(c) Fit a linear model to predict milk yield using both the initial weight of the cow and the treatment as
predictors, assuming additive effects of these two predictors. Write the fitted model in the form
(Yield in ??) = ?? + ?? (Weight in ??)
for each treatment group. In what units are the slope and intercept?
(d) What is the estimated standard error for the slope?
(e) What is the estimated standard error for the intercept in the control treatment?
(f) Is it reasonable to interpret the numerical value of the intercept? Explain.
(g) What is the estimated difference in average milk yield between the control group and the high treatment
group?
(h) What is a typical distance for the actual yield to differ from the predicted yield? Indicate the units.
3. Here is a small data set from an elementary student science project in which the student grew Wisconsin
Fast Plants from seed for 21 days under several experimental conditions. Heights of plants are measured in
cm, fertilizer amount is measured in ml, and sand is the percentage of sand in the soil mixture (the remaining
component is commercial potting soil).
pf2

Partial preview of the text

Download Statistical Methods for Bioscience I - Practice Assignment 1 | HORT 572 and more Assignments Data Analysis & Statistical Methods in PDF only on Docsity!

Stat/F&W/Hort 572 Ane January 22, 2009

Assignment #1 — Due Friday, Jan. 30, 2009, by 4 pm

Turn in lecture, discussion, or to your TA’s mailbox. Please circle the discussion section you expect to pick up this assignment: 311 312 313 314

  1. Download the file fev.txt from the course webpage. This data set contains 654 observations with 5 variables: fev (forced expiratory volume, in liters), ht (height in inches), age (in years), sex and smoke. In R, use the read.table function to read the cows.txt file into R. Use R or the software of your choice to do this assignment.

(a) Plot the forced expiratory volume versus height. Use different colors or point characters for the smoke categories. The options pch=as.numeric(smoke) or col=smoke can be useful with the plot function in R. Describe the relationship between these variables. (b) Fit a simple linear model to predict fev using height as a predictor. Write the fitted model in the form (fev in ??) = ?? + ?? (height in ??) In what units are the slope and intercept? (c) For this linear model, plot the residuals versus the predicted fev values. What assumptions of the linear regression can be assessed with this plot, and do these assumptions seem to be met here?

  1. Download the file cows.txt from the course webpage. The file cows.info is a plain text file that contains information about the variables in the data set cows.txt. In R, use the read.data function to read the cows.txt file into R.

(a) Plot the milk yield versus the initial weight of the cows. Describe the relationship between the vari- ables. What method from last semester may be appropriate to analyze the relationship between these variables? (b) Draw side-by-side boxplots of milk yield versus treatment. Describe the relationship between these variables. What method from last semester may be appropriate to analyze the relationship between these variables? (c) Fit a linear model to predict milk yield using both the initial weight of the cow and the treatment as predictors, assuming additive effects of these two predictors. Write the fitted model in the form (Yield in ??) = ?? + ?? (Weight in ??) for each treatment group. In what units are the slope and intercept? (d) What is the estimated standard error for the slope? (e) What is the estimated standard error for the intercept in the control treatment? (f) Is it reasonable to interpret the numerical value of the intercept? Explain. (g) What is the estimated difference in average milk yield between the control group and the high treatment group? (h) What is a typical distance for the actual yield to differ from the predicted yield? Indicate the units.

  1. Here is a small data set from an elementary student science project in which the student grew Wisconsin Fast Plants from seed for 21 days under several experimental conditions. Heights of plants are measured in cm, fertilizer amount is measured in ml, and sand is the percentage of sand in the soil mixture (the remaining component is commercial potting soil).

Stat/F&W/Hort 572 Ane January 22, 2009

height fertilizer sand 16.0 0 0 11.0 0 25 18.5 5 0 13.0 5 25 19.5 10 0 12.5 10 25

Construct the model matrix X for a multiple regression model to predict height from fertilizer and sand amounts if:

(a) both predictors are treated as quantitative; (b) fertilizer is treated as quantitative, but sand is treated as a factor with levels control and sandy; (c) fertilizer is treated as a factor with levels control, low, and high and sand is treated as a factor with levels control and sandy.

Reading: Acquire the textbook. Read Chapters 1–3.