首页 > > 详细

讲解 BIOL0006 End-of-term assignment Invasive species and global warming调试R程序

BIOL0006 End-of-term assignment

Invasive species and global warming

Originally created by Lauren Enright and Christophe Dessimoz

Last checked by Hernán Burbano, March 2024

1. Background of assignment

In two nearby areas of mainland Australia, there have been recent species introductions. Species 1 is a native mammal which was re-introduced in 1997, as it had not been present in the area for some time. Species 2 is a non-native mammal which was accidentally introduced from a nearby island in 1999. The two species are considered to be similar in terms of life history and ecosystem function. There is interest around these populations due to concern that species 2 could become invasive, so a study was set up in 2000 to monitor the two populations concurrently. After 20 years of the study, these population trends can be compared to find out if species 2 is likely to expand more quickly than species 1, and whether intervention might need to take place. It is also suspected that the population growth rate of these mammals depends on temperature.

2. Research questions

The students are expected to analyse the given data and seek to provide answers to the following:

• Assuming a constant growth rate throughout the study, what is the intrinsic growth rate for each of the two species? Is species 2 likely to expand more quickly than species 1?

• Assuming a varying annual growth rate, is there a correlation between the annual growth rate and temperature, for either of these species?

• What could this mean for the future of the two species?

3. Format of assignment

The student should write a short piece of work (maximum 1500 words) in the style. of an academic paper, exploring the differences between the two species featured in the study. This will involve:

• Title and abstract (~150 words)

• Introduction (~300 words), containing a short review of the topic of invasive species and motivating the questions you will be asking.

• Methods (~300 words), detailing the methods used.

• Results (~300 words), listing the results obtained from the methods, and any associated figures.

• Discussion (~300 words), explaining the meaning and implications of the results, critiquing the methods, suggesting any future work which should be done to answer the questions better, and suggesting any further questions which should or could be asked.

• Appendix (not counted in word limit), could be used to include all of your code so that your results can be easily replicated by a stranger. Your code should be clear and readable, with comments explaining how it works.

The above word limits are given for general guidance only - you could expand more in one section if you prefer, as long as the write-up will not exceed 1500 words overall.

4. Data and specific guidance on the analysis of the data

Population records have been kept for the two species since 2000. Each line of pop_data.csv (available for download from Moodle) corresponds to a year, and contains the mean temperature anomaly of that year (the difference between the mean temperature that year and the baseline temperature measured in 2000), and the number of individuals counted for species 1 and species 2. The count takes place on the first day of the year. For example, the mean temperature anomaly across the period 01/01/2006 to 31/12/2006 was 0.1 degrees Celsius. Then, on 01/01/2007, 208 individuals from species 1, and 123 individuals from species 2 were recorded. Note that the populations were most recently surveyed on 01/01/2020, but temperature data for 2020 is not yet available, so the data entry here is “NA”.

pop_data <- read.csv("pop_data.csv")

Guidance on how to tackle the problem, e.g. how to compute the growth rates, how to gauge an association between temperature and growth rate, which statistical test to use.

Remember that in an exponential model, if the time points are equally spaced, we have

where rt is the intrinsic growth rate at time t.

We can calculate the intrinsic growth rate at any given time as follows:

We could assume that r is constant, but we could also let r depend on time, and write it as rt. For example, we could have rt=α+βTt, where Tt is the temperature and α (the intercept) and β (the slope) are constants. This relationship can be found by using linear regression to estimate the values of the intercept and slope.

After we estimate the intercept and slope, we can find the p-value of the slope being non-zero by carrying out a T-test. The null hypothesis is that intrinsic growth rate is constant (slope=0) and the hypothesis that we are testing is that it depends linearly on temperature anomaly (slope≠0). This is done through the formula:

where n is the number of data points for rt. SE is the standard error, calculated with the formula:

where  denotes the average temperature, i.e. 

The sums are over all the data points in r.

Finally the p-value can be looked up based on the T-value and the number of degrees of freedom (DF=n−2). Note that this is a two-tailed hypothesis test (because the slope could either be greater than or less than 0). There is an R function which can do this for you, called “pt”.

For the assignment, you will need to

• Compute the ratios of population sizes to find out the intrinsic rate of increase each year for each species (as in the right hand side of equation 2). For example, the intrinsic rate of increase of species 1 in 2001 was 110/90=1.22 because the population increased from 90 to 110 during the year 2001. You should obtain a vector of growth rates for each species.

• Assuming a constant intrinsic growth rate, estimate the intrinsic growth rate for each species. This will simply be the mean of the vector of log growth rates (the right hand side of equation (3).

• Assuming a linear dependence of intrinsic growth rate on temperature, estimate the intercept and slope (using equation 3). This will involve a linear model between the vector of log growth rates and the vector of temperature values (see Practical 3).

• For both species, calculate the T-value and then look up the p-value for the slope being non-zero. Then conclude whether or not the dependence you may have found is significant.

We recommend that you plot the data to help guide and check whether your analyses make sense.

Guidance on possible extensions, for students who want to take things further (discretionary)

If you carry out the methods listed and write a paper around them then you have completed the coursework problem, but extensions are encouraged. Here are some example questions you might want to explore by doing additional methods:

• What might happen to these populations in the future under different climate scenarios?

• What could happen if the two species were in competition?

Can the data be explained by any other population model? If you do any model fitting which is more complex than the linear modelling required for the main problem, it will be sufficient to fit models by eye (i.e. try different parameters until it seems to fit the data best), because more advanced fitting methods are beyond the scope of this course.

5. Marking criteria

Marks will take into account both the written and coding aspects of the task.

Written part

• Is the writing clear, concise, and free of over-complicated wording and terminology?

• Is the topic well reviewed in the introduction?

• Is the problem motivated in the introduction?

• Are the methods accurate?

• Are the results well presented?

• Are the results well interpreted in the discussion?

• Does the paper have sufficient references?

• Is the paper referenced correctly?

• Is the paper within the word limit (1500 words maximum, including abstract and figure captions, but excluding bibliography and code provided as appendix)

Code part

• Does the code do what was intended in the methods?

• Is all of the code provided, i.e. is the paper completely reproducible?

• Is the code well indented and commented? Could it be understood by a stranger?

• Is the code concise?

• Is the code automated (rather than just acting like a calculator)?





联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!