dd_LL: Log-Likelihood for compensatory hmnl model

dd_LLR Documentation

Log-Likelihood for compensatory hmnl model

Description

Log-Likelihood for compensatory hmnl model

Usage

dd_LL(draw, dd, fromdraw = 1)

Arguments

draw

A list, 'echoice2' draws object

dd

A tibble, tidy choice data (before dummy-coding)

fromdraw

An integer, from which draw onwards to compute LL (i.e., excl. burnin)

Value

N x Draws Matrix of log-Likelihood values

Examples

data(icecream_discrete)
#fit model
icecream_est <- icecream_discrete %>% dd_est_hmnl(R=10, keep=1, cores=2)
#compute likelihood for each subject in each draw
loglls<-dd_LL(icecream_est, icecream_discrete, fromdraw = 2)

echoice2 documentation built on Nov. 20, 2023, 9:06 a.m.