Error using BART model

102 views
Skip to first unread message

MCkim

unread,
Sep 19, 2018, 6:59:01 AM9/19/18
to hbayesdm-users
Hello, 
Thank you for developing such an convenient toolbox.

I tried newly implemented 'bart_par4' model, and got into trouble.
The example data works well in my computer.

but when I try with my own data
I keep get into  error message


----------------------------------------------
Model name =  bart_par4 
Data file  =  D:/Data_Analysis/BART_pilot/pilot_data/jjh.txt 

Details:
 # of chains                   =  3 
 # of cores used               =  3 
 # of MCMC samples (per chain) =  2000 
 # of burn-in samples          =  1000 
 # of subjects                 =  1 
 # of (max) trials per subject =  90 

***********************************
**  Loading a precompiled model  **
***********************************
In file included from C:/Users/User/Documents/R/win-library/3.5/BH/include/boost/config.hpp:39:0,
                 from C:/Users/User/Documents/R/win-library/3.5/BH/include/boost/math/tools/config.hpp:13,
                 from C:/Users/User/Documents/R/win-library/3.5/StanHeaders/include/stan/math/rev/core/var.hpp:7,
                 from C:/Users/User/Documents/R/win-library/3.5/StanHeaders/include/stan/math/rev/core/gevv_vvv_vari.hpp:5,
                 from C:/Users/User/Documents/R/win-library/3.5/StanHeaders/include/stan/math/rev/core.hpp:12,
                 from C:/Users/User/Documents/R/win-library/3.5/StanHeaders/include/stan/math/rev/mat.hpp:4,
                 from C:/Users/User/Documents/R/win-library/3.5/StanHeaders/include/stan/math.hpp:4,
                 from C:/Users/User/Documents/R/win-library/3.5/StanHeaders/include/src/stan/model/model_header.hpp:4,
                 from filebd083b5147e.cpp:8:
C:/Users/User/Documents/R/win-library/3.5/BH/include/boost/config/compiler/gcc.hpp:186:0: warning: "BOOST_NO_CXX11_RVALUE_REFERENCES" redefined
 #  define BOOST_NO_CXX11_RVALUE_REFERENCES
 ^
<command-line>:0:0: note: this is the location of the previous definition
In file included from C:/Users/User/Documents/R/win-library/3.5/StanHeaders/include/stan/math/rev/core.hpp:44:0,
                 from C:/Users/User/Documents/R/win-library/3.5/StanHeaders/include/stan/math/rev/mat.hpp:4,
                 from C:/Users/User/Documents/R/win-library/3.5/StanHeaders/include/stan/math.hpp:4,
                 from C:/Users/User/Documents/R/win-library/3.5/StanHeaders/include/src/stan/model/model_header.hpp:4,
                 from filebd083b5147e.cpp:8:
C:/Users/User/Documents/R/win-library/3.5/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp:14:17: warning: 'void stan::math::set_zero_all_adjoints()' defined but not used [-Wunused-function]
     static void set_zero_all_adjoints() {

Error in new_CppObject_xp(fields$.module, fields$.pointer, ...) : 
  Exception: mismatch in number dimensions declared and found in context; processing stage=data initialization; variable name=Tsubj; dims declared=(1); dims found=()  (in 'modelbd0823115762_bart_par4' at line 4)

failed to create the sampler; sampling not done
Stan model 'bart_par4' does not contain samples.

************************************
**** Model fitting is complete! ****
************************************

----------------------------------------------------

I think somewhere dimension mismatch or maybe I made error making my data into 'txt' format, but I cannot fix.

Can you advise me to fix this problem?

I attach my data from one participant (90 trials)

Thanks in advance,
Minchul


jjh.txt

Lei Zhang

unread,
Sep 19, 2018, 9:35:05 AM9/19/18
to MCkim, hbayesdm-users
Hi, - this is likely because the model does not support data from a single subject. 
Please try to fit the model with at least two people, and see if the error is still there. 

Sorry for the inconvenience.
L.

---
Lei Zhang


--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to hbayesdm-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbayesdm-users/75ac585b-8fec-4971-a74f-869a2e071f16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

MCkim

unread,
Sep 19, 2018, 10:58:07 PM9/19/18
to hbayesdm-users
Thanks Lei, It worked !

by the way according to manual, it seems like the 4 - parameter bart model has been reshaped by contributors, from original model.

b_00000.jpg

Can I ask contributors to let me see how the equations modified from the original(alpha, mu, gamma plus and beta)?

Thanks in advance, 

b_00000_00000.jpg

b_00000_00001.jpg


Minchul

2018년 9월 19일 수요일 오후 10시 35분 5초 UTC+9, Lei Zhang 님의 말:

---
Lei Zhang


To unsubscribe from this group and stop receiving emails from it, send an email to hbayesdm-user...@googlegroups.com.
To post to this group, send email to hbayesd...@googlegroups.com.

Woo-Young Ahn

unread,
Sep 19, 2018, 11:32:27 PM9/19/18
to hbayesdm-users
Hi Minchul,

We don't have a document describing how we reparameterized the parameters yet, but you can check the actual Stan code here: https://github.com/CCS-Lab/hBayesDM/blob/master/exec/bart_par4.stan (lines 61-83). Hope this helps. 

Best,
Young

MCkim

unread,
Sep 19, 2018, 11:56:03 PM9/19/18
to hbayesdm-users
Thanks ! It helps
Minchul

2018년 9월 20일 목요일 오후 12시 32분 27초 UTC+9, Woo-Young Ahn 님의 말:
Reply all
Reply to author
Forward
0 new messages