Skip to content

Error in Winner's curse correction #21

@Edwa0506

Description

@Edwa0506

The R winner's curse correction uses the below function:

bias <- function(betaTrue, betaObs, se){
z <- betaTrue / se
num <- dnorm(z - c) - dnorm(-z - c)
den <- pnorm(z - c) + pnorm(-z - c)
return(betaObs - betaTrue + se * num / den)
}

The below line is meant to return the bias.
return(betaObs - betaTrue + se * num / den)
But there is a typo. It shoudl really be:
return(betaObs - betaTrue - se * num / den)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions