fitALK {DATRAS}R Documentation

Fit a continuation-ratio logit model for age given length and possibly other covariates.

Description

Fit a continuation-ratio logit model for age given length and possibly other covariates.

Usage

  fitALK(x, minAge, maxAge, mc.cores = 1,
    model = c("cra~LngtCm", "cra~poly(LngtCm,2)", "cra~LngtCm+s(lon,lat,bs='ts')")[method],
    method = 1, autoChooseK = FALSE, useBIC = FALSE,
    varCof = FALSE, maxK = 100, gamma = 1.4,
    verbose = FALSE, ...)

Arguments

x

a DATRASraw object.

minAge

minimum age group to consider

maxAge

maximum age group to consider

mc.cores

The number of cores to use, i.e. how many processes will be spawned (at most)

model

Model formula(string) for ALK, or a vector of strings specifying the formula for each logit (i.e. number of age groups minus one).

method

Use default formula: 1=Normal distributed age-at-length (1st order), 2=Second order polynomial, 3=Spatial ALK, first order length-effect.

autoChooseK

Automatic choice of the max. dimension for the basis used to represent the smooth term for spatial ALK. See ?s in the mgcv-package.

useBIC

Use Bayesian Information Criterion for smoothness selection instead of AIC.

varCof

Use varying coefficients model for spatial effect.

maxK

Maximum k to use. Only applies if autoChooseK is TRUE.

gamma

Multiplier for AIC score (see ?gam)

verbose

Print details about the fitting process.

...

Optional extra arguments to gam()

Value

An object of class 'ALKmodel'


[Package DATRAS version 1.0 Index]