Estimating functional responses

This is the protocol for estimating functional responses. The word document has all the relevant background information.

For the R code there are two scripts. “Internal functions” and “external functions”.  Based on the type of model you want to run (if you want to compare between two treatments or just one and what parameters you want to keep constant between the treatments) you will need to run:

  1. the attack function
  2. gradfun or fun 2. You will need to run gradfun if no depletion occurred (that is if you kept introducing prey into the experiment) or fun2 if there was depletion.
  3. Run the internal function for the model/comparison you want to run.
  4. In the external function script, run the according function to the internal model you chose.
  5. Bear in mind that the model may not converge, so change the starting parameters and often this solves the problems.

If you have any questions about running the code, contact Melissa.

Note: the R scripts are in .txt format because wordpress wouldn’t allow .R files. Change the extension when you source them into R.

Functional response protocol (Edd and Melissa)

InternalFunctions

ExternalFunctions