Commit 4ae8bef6 authored by Simon Ciranka's avatar Simon Ciranka

i implemented MLE and Wouters version of the Bayesian Updating

parent 0fde51d8
......@@ -9,6 +9,8 @@ under the specific probability estimate of the participant is now the
likelihood. For this i need a function that returns discrete values for
the probability denisty in question.
```r
#here i define a function that gives us the probability densitiy of all possible values given the mean and the standart deviation
#of the posterior beta distribution that results from binomal updating.
discretenormalMarble005<-function (possibleResp, mean, stdev){
......@@ -24,6 +26,7 @@ the probability denisty in question.
m = p*possibleResp;
return(list(p,m))
}
```
Sequential Updating
-------------------
......@@ -269,6 +272,7 @@ data and run the script [01\_makeDataFrame.R](01_makeDataFrame.R)
Here i judge via G^2 which model is the best. Lower values is better fit.
```r
data %>% gather( key = ModelLik, value = GSquared, LLLinear, LLExp) %>%
distinct(GSquared,ModelLik) %>%
ggplot(aes(x=as.factor(ModelLik),y=GSquared,color=as.factor(ModelLik)))+
......@@ -280,6 +284,7 @@ Here i judge via G^2 which model is the best. Lower values is better fit.
breaks = c("LLDisc", "LLSimple"),
labels = c("Exponential Weight Beta Update", " Weight Beta Update"))+
my_theme
```
![](LiklelihoodUpdate_files/figure-markdown_strict/unnamed-chunk-1-1.png)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment