logit_avgcat | R Documentation |
Average catch multinomial logit procedure
logit_avgcat(starts3, dat, otherdat, alts)
starts3 |
Starting values as a vector (num). For this likelihood,
the order takes: c([average-catch parameters], [travel-distance
parameters]). |
dat |
Data matrix, see output from shift_sort_x, alternatives with distance. |
otherdat |
Other data used in model (as a list containing objects
'intdat' and 'griddat'). |
alts |
Number of alternative choices in model as length equal to unity (as a numeric vector). |
ld: negative log likelihood
data(zi)
data(catch)
data(choice)
data(distance)
data(si)
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)))
initparams <- c(1.5, 1.25, 1.0, 0.9, 0.8, 0.75, -1, -0.5)
func <- logit_avgcat
results <- discretefish_subroutine(catch,choice,distance,otherdat,
initparams,optimOpt,func,methodname)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.