05.06.2013 Views

Growth model of the reared sea urchin Paracentrotus ... - SciViews

Growth model of the reared sea urchin Paracentrotus ... - SciViews

Growth model of the reared sea urchin Paracentrotus ... - SciViews

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Annex I: R code for fitting growth <strong>model</strong>s<br />

Annexes<br />

Code (as well as dataset presented in annex II) is available at:<br />

http://www.sciviews.org/_phgrosjean/growth/index.htm. This code<br />

runs under <strong>the</strong> free (GNU Public License) statistical s<strong>of</strong>tware R, which<br />

is downloadable at: http://cran.r-project.org. It is available for almost<br />

all plateforms (Unixes, Linux, Windows, MacOS). The 'nlrq' package<br />

for nonlinear quantile regression is also downloadable from <strong>the</strong>re.<br />

Rem: LaboKit and ShellAxis used to assist in measurements <strong>of</strong> <strong>sea</strong><br />

<strong>urchin</strong>s are available for free (GPL) at: http://www.sciviews.org.<br />

a. Code for analyzing data and fitting envelope <strong>model</strong>s<br />

Main script file<br />

This script runs a complete analysis <strong>of</strong> <strong>the</strong> dataset presented in annex<br />

II, and discussed in Part IV. The dataset is first explored (distribution <strong>of</strong><br />

sizes, growth pattern…). Then, quantile regressions are fitted with<br />

traditional <strong>model</strong>s and with <strong>the</strong> original growth <strong>model</strong>. Finally, <strong>the</strong><br />

envelope <strong>model</strong> is designed, tested, and fitted on <strong>the</strong> same dataset.<br />

## Demonstration <strong>of</strong> using R for analyzing growth data as in <strong>the</strong> paper:<br />

# A functional growth <strong>model</strong> with intraspecific competition applied to<br />

# <strong>sea</strong> <strong>urchin</strong>s. Grosjean, Ph., Ch. Spirlet & M. Jangoux (in preparation)<br />

#<br />

# version 1.0 (30/08/2001)<br />

#<br />

# by Ph. Grosjean (phgrosjean@sciviews.org)<br />

# GNU Public License v. 2 or above at your convenience<br />

# Use at your own risks!<br />

# You need:<br />

# R v. 1.3.0 or above (tested only under Windows, please, report o<strong>the</strong>r)<br />

# libraries nls, nlrq, akima (see http://cran.r-project.org)<br />

# files Plividus.txt, <strong>Growth</strong>Fun.R, nlModels.R<br />

# (see http://www.sciviews.org/_phgrosjean/growth/index.htm)<br />

# Put all files in a common directory<br />

# In R, change current directory to that one<br />

# Enter: source("<strong>Growth</strong>.R", print.eval=TRUE)<br />

cat("\n\n ===== DEMONSTRATION OF ANALYSIS OF GROWTH DATA =====\n")<br />

# To do: put here a more detailed introduction!!!<br />

library(nls)<br />

library(nlrq)<br />

source("<strong>Growth</strong>Fun.R")<br />

source("nlModels.R")<br />

215

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!