### Change prior terms for fixed effects

Posted:

**Thu Sep 13, 2018 3:03 pm**Hello community,

I'm running a spatial CAR model and wondered it was possible to change the prior term for the fixed effect from the default which is dflat to dnorm (0, 0.0001)? I know there is an option in the syntax to add informative priors, but in this case, I have 13 covariates including the constant and have no substantive values to input using the matrix option. Likewise, for the random part, can we also change from dgamma to dnorm or half normal distribution as recommended by Gelman (2006).

Is there a way to customize the runmlwin syntax for this?

Also, seems when you use priormatrix (matrix), you cannot results and syntax the files to winbugs formats.

My syntax below is

runmlwin club cons c.stdoffprem c.stdonp stdwhol stdgroc stdconv stdblk std18 std35 stdfem stdvac SEP_INDEX i.combinedzi, ///

level3(POLY_ID: cons, carids(mmid1-mmid10) carweights(carweight1-carweight10)) ///

level2(POLY_ID:) ///

level1(POLY_ID:) ///

discrete(distribution(poisson) link(log) offset(logpop)) ///

mcmc(chain(80000) burnin(20000) refresh(500) ) savewinbugs ( ///

model("paper1_model.txt", replace) ///

inits("paper1_inits.txt", replace) ///

data("paper1_data.txt", replace) ///

)) initsprevious nopause irr

Below is piece of the winbugs code the runmlwin produced.

# Priors for fixed effects

for (k in 1:13) { beta[k] ~ dflat() }

carmean ~ dflat()

# Priors for random terms

tau.u3 ~ dgamma(0.001,0.001)

sigma2.u3 <- 1/tau.u3

Thank you all in advance!

I'm running a spatial CAR model and wondered it was possible to change the prior term for the fixed effect from the default which is dflat to dnorm (0, 0.0001)? I know there is an option in the syntax to add informative priors, but in this case, I have 13 covariates including the constant and have no substantive values to input using the matrix option. Likewise, for the random part, can we also change from dgamma to dnorm or half normal distribution as recommended by Gelman (2006).

Is there a way to customize the runmlwin syntax for this?

Also, seems when you use priormatrix (matrix), you cannot results and syntax the files to winbugs formats.

My syntax below is

runmlwin club cons c.stdoffprem c.stdonp stdwhol stdgroc stdconv stdblk std18 std35 stdfem stdvac SEP_INDEX i.combinedzi, ///

level3(POLY_ID: cons, carids(mmid1-mmid10) carweights(carweight1-carweight10)) ///

level2(POLY_ID:) ///

level1(POLY_ID:) ///

discrete(distribution(poisson) link(log) offset(logpop)) ///

mcmc(chain(80000) burnin(20000) refresh(500) ) savewinbugs ( ///

model("paper1_model.txt", replace) ///

inits("paper1_inits.txt", replace) ///

data("paper1_data.txt", replace) ///

)) initsprevious nopause irr

Below is piece of the winbugs code the runmlwin produced.

# Priors for fixed effects

for (k in 1:13) { beta[k] ~ dflat() }

carmean ~ dflat()

# Priors for random terms

tau.u3 ~ dgamma(0.001,0.001)

sigma2.u3 <- 1/tau.u3

Thank you all in advance!