I ran my model in the RSTAN as follow.
fit.total06 ← stan(“dependencymodel.stan”,data = da,iter=iter, warmup=warmup, cores =2,chains = 2, thin = 1, init = “random”, control = list(c(adapt_delta = 0.99,max_treedepth = 15)))
Now, When I want to calculate the loo and WAIC from the loo package, I get the following error.
extract_log_lik (fit.total06, parameter_name = “log_lik”, merge_chains = TRUE)
Error is as below:
Error in extract_log_lik(fit.total06, parameter_name = “log_lik”, merge_chains = TRUE) :
could not find function “extract_log_lik”
Could someone help me to solve this problem?
Thank you in advance!