epm_normal | R Documentation |
Expected profit model normal catch function
epm_normal(starts3, dat, otherdat, alts)
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]). |
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'). |
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)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.