Winner curse and publication bias

Hello ;
I have simple models to correct for winner’s curse that occurs when one selects on significance.
Here is my Stan code . I also have a write up here

I would very much appreciate any comments /suggestions/pointers to related work.

A Stan Code

// True mean parameter

Listing 1: Stan code for selection bias correction

data {

real <lower=0> sigma ; r e a l t obs ; real <lower=0> alpha ; // Known standard deviation

// Observed t e s t s t a t i s t I c

// S i g n i f i c a n c e l e v e l

}

parameters {

r e a l mu; }

model {

// Compute c r i t i c a l value f o r two−t a i l e d t e s t

r e a l t c = inv Phi (1− alpha /2) ∗ sigma ;

// Calculate s e l e c t i o n p r o b a b i l i t y

r e a l s e l e c t i o n p r o b = 1− ( Phi ( ( t c− mu)/ sigma )

− Phi((− t c− mu)/ sigma ) ) ;

// Prior

mu ˜ normal (0 , 2 ) ;

12// Adjusted l i k e l i h o o d

t a r g e t += normal lpdf ( t obs | mu, sigma )− log ( s e l e c t i o n p r o b ) ;

}

Listing 2: Stan code for hierarchical meta-analysis

data {

int <lower=0> n ; vector [ n ] t obs ; real <lower=0> sigma ; // Number of s t u d i e s

// Observed e f f e c t s i z e s

// Known measurement e r r o r

}

parameters {

r e a l mu; real <lower=0> tau ; vector [ n ] mu i ; // Overall mean e f f e c t

// Between−study het ero gene ity

// True study−s p e c i f i c e f f e c t s

}

model {

// Priors

mu ˜ normal (0 , 2 ) ; tau ˜ cauchy (0 , 1 ) ; // Weakly informative p r i o r on mean

// Half−Cauchy p r i o r on h ete roge nei ty

// H i e r a r c h i c a l s t r u c t u r e

mu i ˜ normal (mu, tau ) ; // True e f f e c t s d i s t r i b u t i o n

t obs ˜ normal ( mu i , sigma ) ; // Likelihood

generated q u a n t i t i e s {

vector [ n ] s h r u n k e n e f f e c t s = mu i ; // Shrinkage estimates

}

}

EDIT by Aki: added code block ticks

@afarahat I added ticks around the code, so it should be easier to read, but there seems to be lot of extra spaces which I think is best if you edit to make the code easier to read

thanks so much, appreciate the help and effort.

It’s going to be hard to say much before I can actually read the model more clearly (feel free to attach with a .txt suffix rather than include), but you are probably going to want a non-centered parameterization in the hierarchical model.

Also, what kind of feedback are you looking for? Coding tips in Stan or is it more substantive about the model? Have you found that this model works in that it recovers quantities of interest you care about under simulated data? And for real data?

Hello Bob;
Thanks for the feedback. I am happy (so far with the Stan code). I am looking for more substantive feedback about the model.So far, I am happy about the tradeoff between the likelihood ( the data ), the prior and the selection on significance. But any feedback comments appreciated.