Last active
January 16, 2016 23:04
-
-
Save ymattu/2f4fa98f61d17d1c2bf9 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; | |
airquality; | |
endsubmit; | |
run ImportDataSetFromR("work.air","airquality"); | |
quit; | |
proc print data=air(obs=30); /*データの確認(変数名など)*/ | |
run; | |
ods graphics on; | |
proc mcmc data=air outpost=airout 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*Solar_R; | |
model Ozone~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