Comments (5)
Could you explain which simulation score
or simulated data
you are referring to?
If you are asking about l
, which is used to compute the utility of l
th balloon pump, this value falls between the range of max pump for each balloon, noted as P
. Still, please specify the simulation
that you are asking about for a clearer answer!
from hbayesdm.
I am asking about the trial-level posterior predictive simulations y_pred
.
for (l in 1:(pumps[j, k] + 1 - explosion[j, k])) {
// u_gain always equals r ^ rho.
u_loss = (l - 1);
u_pump = (1 - p_burst) * u_gain - lambda[j] * p_burst * u_loss +
rho[j] * p_burst * (1 - p_burst) * (u_gain + lambda[j] * u_loss)^2;
// u_stop always equals 0.
delta_u = u_pump - u_stop;
log_lik[j] += bernoulli_logit_lpmf(d[j, k, l] | tau[j] * delta_u);
y_pred[j, k, l] = bernoulli_logit_rng(tau[j] * delta_u);
}
In the above code block, y_pred[j, k, l]
means the l
th pump on trail k
of the j
th person. I am confused about why can't l
be larger than pumps[j, k] + 1 - explosion[j, k])
.
Secondly, if the simulated y_pred[j, k]
is [1, 1, 1, 0, 1, ..., 1, nan, ...]
for k
th trail of the j
th person, is it right to regard the number of pumping of trial k as 3?
Thirdly, if the k
th trail of the 'j'th person exploded at the 5th pump, but the simulated y_pred[j, k]
is [1, 1, 0, 1, 1, nan, ...]
, is it right to regard the simulated y_pred[j, k]
not exploded?
from hbayesdm.
- It’s because
l
is updated per pump, until the last pump available. If you trace back to the top of the stan file,pumps[j,k]
refers to the number of pumps made so far andexplosion[j, k]
is a binary value (0/1) of whether the balloon exploded. - The posterior prediction
y_pred
refers to the probability of the subject pumping the balloon. If you are looking for the probability of the balloon explosion, that would bep_burst.
from hbayesdm.
- If the max number of pump in bart is 60, and for the
k
th balloon ofj
th person, thej
th person stop pumping at the 30th pump, sopumps[j, k]
is 30 andexplosion[j, k]
is 0, which meansl <= 31
. But why can'tl
be larger than 31 cause it may not exploded at 31th pump? - In your code,
y_pred
is a binary value (0/1)
from hbayesdm.
- If the given
pumps[j, k]
is 30, that means the subject already pumped the balloon 30 times in that trial, which rules out the possibility of the 31th pump. Looking into the sample data should help? - Yes, the posterior prediction
y_pred
should save the model’s prediction for each choice made by the participants (whether they choose to pump or not to pump at each moment). So it should be a binary value.
from hbayesdm.
Related Issues (20)
- Delay Discounting Model Issue-- "Some Pareto k diagnostic values are too high" HOT 2
- Error in unserialize(socklist[[n]]) : error reading from connection (ts_par4) HOT 3
- Creating new models in hBayesDM HOT 5
- errors in module 'os' has no attribute 'getuid' HOT 3
- Fatal R error HOT 7
- Removing NA values causes error in choiceRT_ddm? HOT 1
- No alpha negative learning rate HOT 4
- Extract individual subjects' posterior samples? HOT 1
- Choice preservation HOT 1
- Rstudio Error in read.table
- code of pst_gainloss_Q HOT 1
- Issue fitting candidate models in HbayesDM 1.2.0 and 1.1.0 HOT 1
- pstRT_ddm function HOT 2
- hBayesDM package error in R 4.2.2 HOT 12
- Error in HbayesDM model (banditNarm_delta) HOT 1
- Group means for transformed parameters HOT 3
- code issue in "bart_par4" HOT 1
- error in running delay discounting model in R studio
- How to calculate variance from EWMV model
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hbayesdm.