Rubric

  1. (2 p) Read and plot data, with \(x\) = Avg_Mercury vs \(y\) = Alkalinity.

  2. (1 p) Describe the relationship you see.

  3. (3 p) Determine an appropriate transformation of the \(x\)-variable, \(y\)-variable, or both in order to have a straight-line relationship.

  4. (1 p) Plot the data on the transformed scale If you want to make 3 more plots, then choose the one you want to interpret, that will be fine. Consider \((\log(x), y)\), \((x,\log(y))\), and \((\log(x), \log(y))\).

  5. (3 p) Interpret the slope on the transformed scale.

Add to this file under the appropriate subsections below, then submit your results to UNM Learn …

1. Read and plot data

Read the data.

dat <- read.table("ADA1_WS_10_Data-FishMercury.txt", skip = 25, header = TRUE)
str(dat)
## 'data.frame':    53 obs. of  12 variables:
##  $ ID                    : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ Lake                  : Factor w/ 53 levels "Alligator","Annie",..: 1 2 3 4 5 6 7 8 9 10 ...
##  $ Alkalinity            : num  5.9 3.5 116 39.4 2.5 19.6 5.2 71.4 26.4 4.8 ...
##  $ pH                    : num  6.1 5.1 9.1 6.9 4.6 7.3 5.4 8.1 5.8 6.4 ...
##  $ Calcium               : num  3 1.9 44.1 16.4 2.9 4.5 2.8 55.2 9.2 4.6 ...
##  $ Chlorophyll           : num  0.7 3.2 128.3 3.5 1.8 ...
##  $ Avg_Mercury           : num  1.23 1.33 0.04 0.44 1.2 0.27 0.48 0.19 0.83 0.81 ...
##  $ No.samples            : int  5 7 6 12 12 14 10 12 24 12 ...
##  $ min                   : num  0.85 0.92 0.04 0.13 0.69 0.04 0.3 0.08 0.26 0.41 ...
##  $ max                   : num  1.43 1.9 0.06 0.84 1.5 0.48 0.72 0.38 1.4 1.47 ...
##  $ X3_yr_Standard_Mercury: num  1.53 1.33 0.04 0.44 1.33 0.25 0.45 0.16 0.72 0.81 ...
##  $ age_data              : int  1 0 0 0 1 1 1 1 1 1 ...

Plot \(x\) = Avg_Mercury vs \(y\) = Alkalinity on their natural (original) scales.

2. Describe the relationship you see

3. Transform

4. Plot transformed data

5. Interpret slope on the transformed scale