Log-Likelihood for compensatory volumetric demand model
vd_LL_vdm(draw, vd, fromdraw = 1)
A list, 'echoice2' draws object
A tibble, tidy choice data (before dummy-coding)
An integer, from which draw onwards to compute LL (i.e., excl. burnin)
N x Draws Matrix of log-Likelihood values
data(icecream)
#fit model
icecream_est <- icecream %>% vd_est_vdm(R=10, keep=1, cores=2)
#> Using 2 cores
#> MCMC in progress
#> MCMC complete
#> Total Time Elapsed: 0.00 minutes
#compute likelihood for each subject in each draw
loglls<-vd_LL_vdm(icecream_est, icecream, fromdraw = 2)
dim(loglls)
#> [1] 300 10