Last active
March 22, 2017 18:26
-
-
Save jonrobinson2/fae8d4748973c7e89e880c8eca983ca5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(arm) | |
set.seed(987654321) | |
.tmp=(rnorm(100000, mean=0)) | |
.tmp=invlogit(.tmp) | |
shift_param=.3 | |
par(mfrow=c(1,3)) | |
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))) | |
plot(.tmp,invlogit(logit(.tmp) + shift_param)) | |
abline(0,1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment