Assignment

advertisement
Assignment 3
Write a script file that conducts the following commands and e-mail it to me. Be sure you run it
to make sure it works before you send it to me! This assignment will use a fake dataset that
examines the effect of vegetation characteristics and distance to road on the presence (use) or
absence (non-use) of a study species in a habitat patch.
Import ‘Data3a.csv’ that is provided on the web-site
Make sure the data was imported correctly
Generate some summary statistics on the data (mean, min, max, etc.)
Run a univariate logistic regression on the relationship between the presence of the study species
(‘Presence’) and the distance to the nearest road (‘DistToRoad’).
Using a comment, report the estimated coefficient and Standard Error of the effect of road
distance? Is this estimate significantly different from zero?
Run a univariate logistic regression on the relationship between presence of the species and the
habitat type of the patch (‘Habitat’).
Using the anova command, calculate the significance of the group variable ‘habitat’
Using a comment, report the p-value of the significance of the group variable (‘Habitat).
Use a comment to indicate what the reference habitat is in the general linear model and whether
the two other habitats are significantly different from the reference
Create a new logistic model that combines any groups that are not significantly different from
each other.
Run a multiple logistic regression on the relationship between ‘Presence’ and both explanatory
variables (DistToRoad and Habitat).
Re-run the multiple logistic regression analysis, but combine any habitat groups that are not
significantly different from each other, be sure to use the anova command to determine if the
more complex models are ‘better’
Paste the summary output from your final statistical model into the script using comments
Download