Problem is taken from this paper..
This is what I have tried so far..
Y = rnorm(100,4.7,4.3) # simulate a parameter with mean 4.7, sd 4.3 from noisy data
A = data.frame(Y) # convert to data frame
#Assuming true effect size to be 0.3 , can be represented as normal and Cauchy priors .With location 0 and scale 0.3
Fit1 = stan_glm( Y~1, data=A, family=gaussian(),prior_intercept= normal(0,0.3) )
Fit2 = stan_glm( Y~1, data=A, family=gaussian(),prior_intercept= cauchy(0,0.3) )
However summary of these estimates are way off
Where am I going wrong ?
Where am I going wrong ?