modlike: This function calculates negative log-liklihood for a habitat...

Description Usage Arguments Examples

View source: R/MEHRSI.R

Description

This function takes observed and predicted CPUE and calculates a negative log-likelhood for the data it uses either a log-normal or gamma distribution. The model form, parameters, habitat variables, presence or absence and year are passed through this function to the HabModel function which computes the predicted values. It accepts "normal" or "gamma" as arguments for distribution.

Usage

1
2
modlike(par, form, variables, ob_CPUE, pred_pa = 1, year,
  distribution = "normal")

Arguments

par

values for each of the parameters

form

for each variable, a form for the model equation (1, 2 or 3)

variables

Set of habitat variables to use in the modeling

ob_CPUE

Observed CPUE at the transect

pred_pa

Predicted presence or absence at the transect

year

Set of habitat variables to use in the modeling

distribution

Either "normal" (the default) or "gamma"

Examples

1

rooperc4/MEHRSI documentation built on May 21, 2019, 9:35 a.m.