growthparGen: Generate growth parameters for soVBGF

Description Usage Arguments Value References Examples

View source: R/growthparGen.R

Description

Generate growth parameters for a population for the seasonally oscillating von Bertalanffy growth function with a given given mean and coefficient of variation. Generated parameters can be passed to growth_soVB. The model creates variation in growth based on a mean phi prime value for the population, which describes relationship between individual Linf and K values. See Vakily (1992) for more details.

Usage

1
2
growthparGen(n = 100, K.mu = 0.5, K.cv = 0.05, Linf.mu = 80,
  Linf.cv = 0.05, ts = 0.25, C = 0.85, t0 = -0.1)

Arguments

n

number of individuals to general

K.mu

mean growth constant K of population

K.cv

coefficient of variation for growth constant K

Linf.mu

mean infinite length of population

Linf.cv

coefficient of variation for infinite length Linf

ts

summer point (0-1)

C

oscilation strength (0-1)

t0

age at lengthh zero

Value

data.frame with seasonally oscillating von Bertalanffy growth function parameters for each individual (rows).

References

Vakily, J.M., 1992. Determination and comparison of bivalve growth, with emphasis on Thailand and other tropical areas. WorldFish.

Munro, J.L., Pauly, D., 1983. A simple method for comparing the growth of fishes and invertebrates. Fishbyte 1, 5-6.

Pauly, D., Munro, J., 1984. Once more on the comparison of growth in fish and invertebrates. Fishbyte (Philippines).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
set.seed(1111)
inds <- growthparGen(n=500)

# check of growth performance index (phi')
plot(K ~ Linf, inds, log="xy")
coef(lm(log10(K) ~ log10(Linf), inds))[1] # phiprime
mean(inds$phiprime) # comparison

# generate growth curves
z <- inds$Linf
pal <- colorRampPalette(c("#0000FF80", "#00FFFF80", "#FFFF0080", "#FF000080"), alpha=TRUE )
col <- pal(100)
zlim <- range(z)
breaks <- seq(zlim[1], zlim[2], length.out=(length(col)+1))
CUT <- cut(z, breaks=breaks, include.lowest = TRUE)
colorlevels <- col[match(CUT, levels(CUT))]
t <- seq(-0.1,6,len=100)
for(i in seq(nrow(inds))){
  tmp <- as.list(inds[i,c("Linf", "K", "t0", "ts", "C")])
  tmp$t <- t
  tmp$Lt <- do.call(growth_soVB, tmp)
  if(i == 1){
    plot(Lt ~ t, data=tmp, t="n", ylab="Lt", ylim=c(0,max(zlim)))
    usr <- par()$usr
    rect(usr[1], usr[3], usr[2], usr[4], col="grey85")
    grid(col="white")
  }
  lines(Lt ~ t, data=tmp, col=colorlevels[i])
}

marchtaylor/fishdynr documentation built on May 21, 2019, 11:27 a.m.