SpTB / mob_project

1 stars 0 forks source link

generating myopic expectation #3

Open SpTB opened 3 years ago

SpTB commented 3 years ago

I'm trying to simulate some data using myopic estimation. Am I correct to assume that I can used a modified version of this function:

expectationTotal <- function(timeSteps, lambda, sigma, B, delta, rewardRate, totalTime){ phi <- pnorm((delta - (lambda * timeSteps))/(sigma * sqrt(timeSteps))) sumRewards<- ((1 - phi) * B) + (rewardRate*lambda*(totalTime - timeSteps)) return(sumRewards) }

I'm not sure what does the rewardRate variable do, but comparing this with the equation from the paper, I assume I can remove the last term (rewardRate*lambda*(totalTime - timeSteps)) to get myopic estimation at timeStep = t, where delta is a dynamic threshold (i.e. original threshold - accumulated points). So, the modified myopic function would look like this:

expectationMyo <- function(timeSteps, lambda, sigma, B, delta){ phi <- pnorm((delta - (lambda * timeSteps))/(sigma * sqrt(timeSteps))) sumRewards<- ((1 - phi) * B) return(sumRewards) }

pantelispa commented 3 years ago

Just to make sure that I understand: Do you just want to get the estimated returns from the perspective of a myopic agent or do you want to generate the giving up curve?

We have written functions for all that for the Cognitive Science paper, and the code is openly available. The code is quite well documented, so it should not be hard to find it.

SpTB commented 3 years ago

I'm trying to generate expectation for a generative model using myopic estimation.

The attached function is taken from your files. I think my version works correctly, as plugging in different values gives sensible results. Just wanted to make sure, as (as mentioned in the post) I'm not entirely sure what all the variables are supposed to do , as the term (rewardRate*lambda*(totalTime - timeSteps)) is absent in the equation from the paper. I assume it's some sort of generalization...