User Specified Priors

rstanarm के साथ Bayesian Regression Modeling

Jake Thompson

Psychometrician, ATLAS, University of Kansas

डिफॉल्ट prior क्यों बदलें?

  • मजबूत कारण कि पैरामीटर एक निश्चित मान लेगा
  • पैरामीटर पर बाधाएँ
rstanarm के साथ Bayesian Regression Modeling

Prior सेट करें

stan_model <- stan_glm(kid_score ~ mom_iq, data = kidiq,
  prior_intercept = normal(location = 0, scale = 10),
  prior = normal(location = 0, scale = 2.5),
  prior_aux = exponential(rate = 1)
)
rstanarm के साथ Bayesian Regression Modeling

Prior सेट करें

stan_model <- stan_glm(kid_score ~ mom_iq, data = kidiq,
  prior_intercept = normal(location = 0, scale = 10, autoscale = FALSE),
  prior = normal(location = 0, scale = 2.5, autoscale = FALSE),
  prior_aux = exponential(rate = 1, autoscale = FALSE)
)
rstanarm के साथ Bayesian Regression Modeling

Prior सेट करें

stan_model <- stan_glm(kid_score ~ mom_iq, data = kidiq,
  prior_intercept = normal(location = 3, scale = 2),
  prior = cauchy(location = 0, scale = 1))
  • कई तरह के priors
    • normal()
    • exponential()
    • student_t()
    • cauchy()
  • ?priors
rstanarm के साथ Bayesian Regression Modeling

Flat priors

stan_model <- stan_glm(kid_score ~ mom_iq, data = kidiq,
  prior_intercept = NULL,
  prior = NULL,
  prior_aux = NULL)
prior_summary(stan_model)
Priors for model 'stan_model' 
 ------
Intercept (after predictors centered)
 ~ flat

Coefficients
 ~ flat

Auxiliary (sigma)
 ~ flat
 ------
See help('prior_summary.stanreg') for more details
rstanarm के साथ Bayesian Regression Modeling

अभ्यास करते हैं!

rstanarm के साथ Bayesian Regression Modeling

Preparing Video For Download...