Skip to content

Instantly share code, notes, and snippets.

@richarddmorey
Created January 3, 2021 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richarddmorey/b09d80111de1c9085d76c9b3151897ad to your computer and use it in GitHub Desktop.
Save richarddmorey/b09d80111de1c9085d76c9b3151897ad to your computer and use it in GitHub Desktop.
rlogis, R and JAGS
x = rlogis(10000,0,10)
mod = "model{
y ~ dlogis(0, 1/10)
}
"
library(rjags)
m = rjags::jags.model(file = textConnection(mod))
s = rjags::coda.samples(m,n.iter = 10000,variable.names = "y")
x1 = s[[1]][,"y"]
qqplot(x1,x)
abline(0,1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment