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.

Annexes<br />

Code <strong>of</strong> functions required to run <strong>the</strong> script<br />

These functions perform various data manipulations and implement <strong>the</strong><br />

object-oriented R code for fitting envelope <strong>model</strong>s. Utilities to convert<br />

data, to generate artificial datasets and to run simulations are also<br />

provided.<br />

#===============================================================================#<br />

# #<br />

# Envelope <strong>Growth</strong> Models v. 1.0. #<br />

# #<br />

#===============================================================================#<br />

#<br />

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

#<br />

# Parameters estimation, analyses and simulations <strong>of</strong> envelope growth <strong>model</strong>s<br />

# including <strong>the</strong> fuzzy-remanent growth curve presented in:<br />

# Grosjean, Ph., Ch. Spirlet & M. Jangoux, A functional growth <strong>model</strong> with<br />

# intraspecific competition applied to <strong>sea</strong> <strong>urchin</strong>s (in preparation).<br />

# Regression methods include nonlinear quantile regression with an interior<br />

# point algorithm <strong>of</strong> Koenker, and a custom nonlinear quantile regression<br />

# over <strong>the</strong> whole quantile range 0 -> 1 specifically developped for envelope<br />

# growth <strong>model</strong>s (<strong>model</strong>s that envelop size distributions with time).<br />

#<br />

# This is a free s<strong>of</strong>tware distributed under <strong>the</strong> terms <strong>of</strong> <strong>the</strong> GNU Public<br />

# License version 2 or above at your convenience (see licence.txt).<br />

#<br />

#This version is still in development. Use at your own risks!<br />

# To run <strong>the</strong>se samples:<br />

# Source this file in R, version 1.3.0 or higher<br />

# Change current directory to <strong>the</strong> one containing Plividus.txt and <strong>Growth</strong>.R<br />

# and enter source("<strong>Growth</strong>.R", print.eval=TRUE) in R<br />

#(see <strong>Growth</strong>.R for more details)<br />

###==== Basic data manipulation ===========================================<br />

# Data are issued from Plividus.txt and stored in variable 'dat':<br />

# dat is: - col #1: class (1 by 1 mm in test diameter)<br />

# - col #2: mean diameter for each class (ex: class 1 = 0 to 1 mm, mean diam.<br />

= 0.5 mm)<br />

# - cols #3 to 27: counts <strong>of</strong> individuals in each class at various increasing<br />

ages (Xxxx where xxx is age from fertilisation in days)<br />

## Transformations <strong>of</strong> raw data<br />

# Sum per column<br />

colsum

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

Saved successfully!

Ooh no, something went wrong!