R: Exploratory Growth Modeling with Age and Length Data
groageexp
R Documentation
Exploratory Growth Modeling with Age and Length Data
Description
For a data object of class 'GroAgeData' examine the goodness of initial guessed
values of model parameters by making predictions and calculating residuals.
Usage
groageexp(x, m, unsex.action = NULL, par, distr)
Arguments
x
An object of class 'GroAgeData'.
m
Character, the specific growth model to be examined, either 'vonBer' (von
Bertalanffy), 'schnute1', 'schnute2', or 'schnute3'
unsex.action
Character, optionally, when there are unsexed individual, what to do with these,
either 'split' (random assignment of half to males and half to females), 'males'
(complete assignment to males), 'females' (complete assignment to females), or
'ignore'.
par
Numeric, the logarithm of the vector of initial parameter values.
distr
Character, the distribution of the data, either 'apnormal' (adjusted profile
approximation to the normal likelihood), 'aplnormal' adjusted profile
approximation to the lognormal likelihood), 'normal', 'lognormal', or 'gamma'.
Details
When the distribution of the data is 'normal', 'lognormal', or 'gamma', an
additional dispersion parameter has to be provided along with the growth model
parameters, and placed at the end of the parameter vector.
Value
A list with class attribute 'GroAgeExp' with the following components:
Properties
Properties of the data, passed from 'x'
Data
A data.frame with age, observed length, predicted length, and
'deviance' residuals
Data
Optionally, the same as previous component but for the other sex
Note
Model types 'schnute1', 'schnute2', 'schnute3' have 5, 3, and 2 parameters
respectively. 'schnute1' is described in Arkhipkin and Roa-Ureta (2005) whereas
'schnute2' and 'schnute3' are described in Roa-Ureta (2010).
Author(s)
Ruben H. Roa-Ureta
References
Arkhipkin, A., Roa-Ureta, R. 2005. Identification of growth models for squids.
Marine and Freshwater Research 56:371-386.
Roa-Ureta, R. 2010. A likelihood-based model of fish growth with multiple length
frequency data. Journal of Agricultural, Biological and Environmental Statistics
15:416-429
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(LifeHist)
Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2
Attaching package: 'Hmisc'
The following objects are masked from 'package:base':
format.pval, round.POSIXt, trunc.POSIXt, units
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LifeHist/groageexp_1.Rd_%03d_medium.png", width=480, height=480)
> ### Name: groageexp
> ### Title: Exploratory Growth Modeling with Age and Length Data
> ### Aliases: groageexp
> ### Keywords: ~models
>
> ### ** Examples
>
> #Schnute - Normal
> data(ksbream)
> KSBream.AgeLen <- as.GroAgeData(x=ksbream,
+ sex="Total",
+ maleskey=1,
+ femaleskey=2,
+ coldate=1,
+ colsex=9,
+ colage=11,
+ collen=2,
+ colbw=5,
+ colliver=7,
+ colgonad=8,
+ lentype="Total",
+ unitsage="Years",
+ unitslen="mm",
+ unitsbw="g",
+ unitsliver="g",
+ unitsgonad="g",
+ spec="KSBream")
> #par ini
> l1.f <- 175
> a1.f <- 1
> mu.f <- 250
> g1.f <- 0.15
> g2.f <- 0.1
> l1.m <- 175
> a1.m <- 1
> mu.m <- 210
> g1.m <- 0.25
> g2.m <- 0.1
> psi.f <- 0.5
> psi.m <- 0.45
> par.ini <- log(c(l1.f,a1.f,mu.f,g1.f,g2.f,l1.m,a1.m,mu.m,g1.m,g2.m,psi.f,psi.m))
> KSBream.AgeLen.exp <- groageexp(x=KSBream.AgeLen,
+ unsex.action="split",
+ m="schnute1",
+ par=par.ini,
+ distr="normal")
> plot(KSBream.AgeLen.exp)
>
>
>
>
>
> dev.off()
null device
1
>