epm_normal: Expected profit model normal catch function

View source: R/epm_normal.r

epm_normalR Documentation

Expected profit model normal catch function

Description

Expected profit model normal catch function

Usage

epm_normal(starts3, dat, otherdat, alts)

Arguments

starts3

Starting values as a vector (num). For this likelihood, the order takes: c([catch-function parameters], [travel-distance parameters], [catch sigma(s)], [scale parameter]).

The catch-function and travel-distance parameters are of length (# of catch-function variables)*(k) and (# of travel-distance variables) respectively, where (k) equals the number of alternatives. The catch sigma(s) are either of length equal to unity or length (k) if the analyst is estimating location-specific catch sigma parameters. The scale parameter is of length equal to unity.

dat

Data matrix, see output from shift_sort_x, alternatives with distance.

otherdat

Other data used in model (as a list containing objects 'intdat', 'griddat', and 'prices').

For this likelihood, 'intdat' are "travel-distance variables", which are alternative-invariant variables that are interacted with travel distance to form the cost portion of the likelihood. Each variable name therefore corresponds to data with dimensions (number of observations) by (unity), and returns a single parameter.

In 'griddat' are "catch-function variables" that are alternative-invariant variables that are interacted with zonal constants to form the catch portion of the likelihood. Each variable name therefore corresponds to data with dimensions (number of observations) by (unity), and returns (k) parameters where (k) equals the number of alternatives.

For "catch-function variables" 'griddat' and "travel-distance variables" 'intdat', any number of variables are allowed, as a list of matrices. Note the variables (each as a matrix) within 'griddat' 'intdat' have no naming restrictions. "Catch-function variables" may correspond to variables that impact catches by location, or interaction variables may be vessel characteristics that affect how much disutility is suffered by traveling a greater distance. Note in this likelihood the "catch-function variables" vary across observations but not for each location: they are allowed to impact catches differently across alternatives due to the location-specific coefficients. If there are no other data, the user can set 'griddat' as ones with dimension (number of observations) x (number of alternatives) and 'intdat' variables as ones with dimension (number of observations) by (unity).

The variable 'prices' is a matrix of dimension (number of observations) by (unity), corresponding to prices.

alts

Number of alternative choices in model as length equal to unity (as a numeric vector).

Value

ld: negative log likelihood

Graphical examples

Figure: epm\_normal\_grid.png
Figure: epm\_normal\_travel.png
Figure: epm\_normal\_sigma.png

Examples

data(zi)
data(catch)
data(choice)
data(distance)
data(si)
data(prices)

optimOpt <- c(1000,1.00000000000000e-08,1,0)

methodname <- 'BFGS'

si2 <- sample(1:5,dim(si)[1],replace=TRUE)
zi2 <- sample(1:10,dim(zi)[1],replace=TRUE)

otherdat <- list(griddat=list(si=as.matrix(si),si2=as.matrix(si2)),
    intdat=list(zi=as.matrix(zi),zi2=as.matrix(zi2)),
    pricedat=list(prices=as.matrix(prices)))

initparams <- c(0.5, 0.4, 0.3, 0.2, 0.55, 0.45, 0.35, 0.25, -0.3, -0.4,
    3, 2, 3, 2, 1)

func <- epm_normal

results <- discretefish_subroutine(catch,choice,distance,otherdat,
    initparams,optimOpt,func,methodname)


allen-chen-noaa-gov/barebones.FishSET documentation built on March 1, 2024, 8:19 a.m.