Bug report for hBayesDM

68 views
Skip to first unread message

Yueqing Zhou

unread,
Feb 17, 2024, 2:56:16 AM2/17/24
to hbayesdm-users
Hi,
 gathered a set of data with attention set shifting (ASST) data, which is the rodent version of the Wisconsin card sorting test. I want to dive deeper into the psychological aspect of this data set, and I came across the hBayesDM package written in R. I think the Bayesian function in the hBayesDM package fits my needs. I want to adapt the wcs_sql.R function to fit ASST data. And rebuild a custom R package. But I found out that the Rstan is preventing the package building process and raised the following error: "Error in rstan::stanc(f, allow_undefined = TRUE, obfuscate_model_name = FALSE): parser failed badly; maybe try installing the V8 package"

I wonder if you have encountered a similar issue before. If so, could you please share how you solved it? I would appreciate your support.

I look forward to hearing from you!

Best regards!
Yueqing

Jeung-Hyun Lee

unread,
Feb 20, 2024, 2:03:11 AM2/20/24
to Yueqing Zhou, hbayesdm-users
Hi Yueqing, 

We've noticed the error is usually due to any line including "#" (even in comments) in the stan file. You can replace "#"s with "//" to comment out lines. 

Cheers,
JH

Jeung-Hyun Lee
PhD candidate,
Computational Clinical Science Lab.
Department of Psychology
Seoul National University 
Building 16, Room A107


2024년 2월 17일 (토) 오후 4:56, Yueqing Zhou <yueqing...@gmail.com>님이 작성:
--
You received this message because you are subscribed to the Google Groups "hbayesdm-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbayesdm-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbayesdm-users/9cf901fb-45d3-4c13-ac4d-92b6bc7cae94n%40googlegroups.com.

Yueqing Zhou

unread,
Feb 20, 2024, 11:27:48 AM2/20/24
to Jeung-Hyun Lee, hbayesd...@googlegroups.com, lanyua...@163.com
Hi Jeung-Hyun,

Thank you very much for your response! Following your guidance, I have
removed every "#" symbol from all 64 Stan files located within the
"...hBayesDM/inst" folder. However, upon documenting the package, I
again encountered the same error. For your review, I've attached the
error message below.

Could you please advise on the next steps to resolve this issue?

Best regards,
Yueqing
image.png

Jeung-Hyun Lee

unread,
Feb 20, 2024, 11:27:52 AM2/20/24
to Yueqing Zhou, hbayesd...@googlegroups.com, lanyua...@163.com
Hi Yueqing,

More information on (1) what you have done and (2) what you need will be helpful to solve the issue.  Regarding the error message you shared, removing "#"s from all the stan files located within the '/hBayesDM/inst' folder (I guess you are referring to /hBayesDM/commons/stan_files) might have caused the error. If you are trying to use the wcs_sqn model for your own dataset, I suggest you to make edits to the stan file (link) with customized R codes. While doing this, make sure that your (new) stan file doesn't include "#" symbols to prevent the initial error you shared. Let me know if anything is unclear. 

Cheers,
JH


Jeung-Hyun Lee
PhD candidate,
Computational Clinical Science Lab.
Department of Psychology
Seoul National University 
Building 16, Room A107


2024년 2월 21일 (수) 오전 12:39, Yueqing Zhou <yueqing...@gmail.com>님이 작성:
Reply all
Reply to author
Forward
0 new messages