Attempts to use reloo() called via loo(...,k_threshold=...) with a stan_clogit() object produce an error.
Description:
When I call loo() on an object created with stan_clogit() and need to rerun some observations (using the k_threshold argument), I get this error: Error in ptr() : Not a closure: special.
I get exactly the same error on two different datasets/models. Debugging, it looks like the error is in log_lik.stanreg() and specifically in ll_args.stanreg(). Any help greatly appreciated, thanks.
Reproducible Steps:
#example from stan_clogit help
dat <- infert[order(infert$stratum), ] # order by strata
post <- stan_clogit(case ~ spontaneous + induced + (1 | education),
strata = stratum,
data = dat,
subset = parity <= 2,
QR = TRUE,
chains = 2, iter = 1500) # for speed only
loo(post,k_threshold=.7)
Summary:
Attempts to use
reloo()
called vialoo(...,k_threshold=...)
with astan_clogit()
object produce an error.Description:
When I call
loo()
on an object created withstan_clogit()
and need to rerun some observations (using thek_threshold
argument), I get this error:Error in ptr() : Not a closure: special.
I get exactly the same error on two different datasets/models. Debugging, it looks like the error is in
log_lik.stanreg()
and specifically inll_args.stanreg()
. Any help greatly appreciated, thanks.Reproducible Steps:
RStanARM Version:
2.18.9
R Version:
3.6.1
Operating System:
Ubuntu 18.04.3