Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save anniejw6/add80c13491832967063998c20b3586d to your computer and use it in GitHub Desktop.
Save anniejw6/add80c13491832967063998c20b3586d to your computer and use it in GitHub Desktop.
require(arm)
set.seed(987654321)
.tmp=(rnorm(100000, mean=0))
.tmp=invlogit(.tmp)
shift_param=.3
par(mfrow=c(1,2))
hist(x=.tmp, main=paste0('Mean=',round(mean(.tmp),3)))
hist(x=invlogit(logit(.tmp) + shift_param),main=paste0('Mean=',round(mean(invlogit(logit(.tmp) + shift_param)),3)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment