Question
Lab 6: Practice with R and RStudio Purpose: To become more familiar with R functions for obtaining descriptive statistics, building histograms and scatterplots, and conducting
Lab 6: Practice with R and RStudio
Purpose: To become more familiar with R functions for obtaining descriptive statistics, building histograms and scatterplots, and conducting simple linear regression.
1. Introduction
The data came from the U.S. Forest Service, Forest Inventory and Analysis (FIA) program in Tennessee. For this lab, we will assume the data were collected on six (6) 1/10th acre plots. The variables include:
plot: The plot number (1-6) spp_cd: The FIA species code corresponding to the spp column spp: The tree species for that tree dbh: The diameter (in) of the tree at 4.5 ft. above the ground ba: The basal area (ft2) of the tree; represents the cross-sectional surface area of the tree at 4.5 ft. above the ground. ht: The height (ft) of the tree
cr: The crown ratio (%) of the tree; represents the percentage of the tree bole that includes live crown volume: The total volume (ft3) in the tree bole
2. EXERCISES:
a. Build a histogram of dbh values (ensure you include proper axis labels, color the bars dark grey, and remove the title)
b. Build a scatterplot of volume vs. ba (volume is the response) (ensure you include proper axis labels)
c. Compute the mean, median, standard deviation, Q1, Q3, minimum, maximum, and CV of tree height
d. Fit the regression equation: volume =?0 +?1?a;; identify the estimates of ?0 , ?1 , and ?^?
e. Build a Q-Q plot of the standardized residuals (include proper axis labels); do we have normality?
plot spp_cd spp dbh ba ht cr volume 802 white_oak 8.9 0.4320113 57 30 8.42 802 white_oak 10.3 0.5786149 64 30 12.85 802 white oak 6.8 0.252193 52 30 4.31 802 white_oak 24.3 3.2205325 123 30 136.69 802 white_oak 5.7 0.1772005 44 30 2.41 131 loblolly_pine 18.8 1.9276618 90 40 66.36 68 eastern_redc 6.2 0.2096518 38 20 2.91 131 loblolly_pine 10.4 0.5899046 73 25 15.98 131 loblolly_pine 15.1 1.2435665 81 35 38.26 68 eastern_redc 7.4 0.298661 29 55 3.19 68 eastern_redc 5.5 0.1649835 36 55 2.09 68 eastern_redc 6.2 0.2096518 44 25 3.42 68 eastern_redc 6.1 0.2029433 44 40 3.3 802 white_oak 8.6 0.4033778 57 45 7.84 68 eastern_redc 6.5 0.2304315 38 25 3.23 W W W W W W W W W W W W N N AK 68 eastern_redc 8.4 0.3848342 45 35 6.69 68 eastern_redc 7.6 0.315023 45 25 5.31 621 yellow_popla 12.7 0.8796757 79 40 23.51 621 yellow_popla 5.1 0.1418585 50 35 1.95 621 yellow_popla 5.1 0.1418585 53 25 2.1 621 yellow_popla 5 0.13635 52 30 1.95 621 yellow_popla 5.1 0.1418585 48 20 1.85 68 eastern_redc 8.1 0.3578369 43 40 5.91 316 red_maple 15.2 1.2600922 85 40 34.89 621 yellow_popla 12.9 0.9076001 93 25 28.45 316 red_maple 5.8 0.1834726 42 30 2.23 316 red_maple 9.4 0.4819154 71 30 11.5 316 red_maple 5 0.13635 40 25 1.75 316 red_maple 8.6 0.4033778 79 20 10.71 316 red_maple 6.7 0.2448301 66 25 5.38 316 red_maple 14.3 1.1152885 94 35 34.17 316 red_maple 19.2 2.0105626 94 40 61.04 621 yellow_popla 14.9 1.2108425 79 40 32.18 316 red_maple 8.4 0.3848342 79 30 10.21 621 yellow_popla 21.3 2.4744253 113 40 93.12 621 yellow_popla 10.4 0.5899046 73 35 14.62 621 yellow_popla 11.4 0.7088018 85 25 20.45 621 yellow_popla 8.3 0.3757261 72 20 8.98 621 yellow_popla 10.4 0.5899046 82 20 16.49 621 yellow_popla 6.1 0.2029433 58 10 2.8 316 red_maple 6.6 0.2375762 56 10 1.15 621 yellow_popla 5 0.13635 71 30 5.94 131 loblolly_pine 5.7 0.1772005 43 30 2.17 131 loblolly_pine 11.2 0.6841498 70 35 17.84Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started