Assignment #1 - Basic regression - 2019

For each of the following datasets, run a regression analysis (using the lm function) in R. Report your results in a Word Document using the following template, which we discussed in class:

For each 1 [x-unit] increase in [x], we observed a [slope][y-unit](± [95% C.I.], ± 95% C.I.) [increase/decrease] in [y] (p = [p-value]; r^2 = [r^2]).

Be sure that if your results are not statistically significant, you say so in your sentence. Also, be sure to report the exact p-value (don't use p < 0.0001). Finally, plot the data and the best-fit line to the data.

Show (or E-mail) me the word document containing the 3 sentences and the 3 plots (I don't need anything else)

Be sure to use the 'Data' in your analysis, not 'Truth'. Truth has been given only for information purposes so that you can see how the data was made and check your work.

Dataset #1 - In this dataset, you are interested in examining the relationship between the density of Pardosa sp. (wolf spiders; y-variable - spiders / sq. meter) as a function of the density of other spiders (x-variable; spiders / sq. meter). For those that are interested, wolf spiders are those spiders you often find without webs crawling around your house; they hunt other spiders. So in the houses/apartments of 40 different graduate students, you collected all the spiders you could find and calculated the density of each type of spider (spiders/sq. meter area).

Data; Truth

Dataset #2 - In this dataset, you are looking at the relationship between the size of a particular lotus flower (y-variable; diameter in cm) as a function of the elevation it is growing in the Himalayan Mountains (x-variable; meters). You've collected 473 flowers in your trek across Nepal. Note that in this dataset, the slope is very small. For reporting purposes, it is entirely acceptable to SCALE the slope that you report. Just multiply the change in x (in the standard sentence it's just 1), the slope, and the confidence intervals all by the scaling factor.

Data; Truth

Dataset #3 - In this dataset, you are interested in the relationship between the amount of time spent foraging by Columbian ground squirrels (y-variable; minutes/day) as a function of number of birds of prey observed over the colony the preceding day (x-variable; predators/day). You recorded the amount of time spent outside the burrow by each of 10 squirrels over the course of 2 weeks, as well as the number of birds of prey that flew over that colony. Note: careful with which variable is X and which is Y.

Data; Truth