Last active
January 15, 2016 17:41
-
-
Save ymattu/57e7beca1300c0020566 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
proc iml; | |
submit/R; | |
iris; | |
endsubmit; | |
run ImportDataSetFromR("work.iris","iris"); | |
quit; | |
proc print data=iris(obs=30) /*データの確認(変数名など)*/ | |
run; | |
ods graphics on; | |
proc mcmc data=iris outpost=irisout nmc=5000 thin=5 seed=123; | |
parms beta0 beta1 0; | |
parms sigma2 1; | |
prior beta0 beta1~ normal(mean=0, var=1e6); | |
prior sigma2 ~igamma(shape=3/10, scale=10/3); | |
mu = beta0 + beta1*Sepal_Width; | |
model Sepal_Length~n(mu, var=sigma2); | |
run; | |
ods graphics off; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment