Bayes - need help informing priors

#1
Hi!

Anyone here familiar with Bayesian inference?

I would like to inform priors for an analysis. I have Odds Ratios and 95% CIs. How would I calculate the variance from the CIs. I know how to calculate SEs, but I don't think that is the custom for priors (its usually mean and variance).

Example: I have to average two ORs (1.01 + 0.96)/2 = .99. The largest upper limit of the CIs =1.06 and the smallest lower limit of the CIs = .91. The SE = (1.06-0.91)/3.92 = 0.04. But, again, I don't think using SEs is the standard for priors. Can anyone use this information to calculate the variance?

If you can, you will be my best friend forever.
 
#3
#4
Oh, I thought I replied to this.

Thank you so much for your response and the link. If you could crunch the numbers, I would be most grateful! That said, do you even know if it is possible to calculate variance from the data I have available to me? Thanks again!!
 

hlsmith

Omega Contributor
#5
So, per my notes, you have your possible prior ORs and you average to get the mean. Like you have already done.


(log(0.96) + log(1.01)) / 2
= -0.01543






Now for the standard deviation you flip the order of the two ORs and subtract them and divide by 4. So...


( log(OR) - log(OR) ) / 4 =
(0.00995 - (-0.04082)) / 4 =
=0.0126925


Then variance, you square it.
If you need precision: 1/variance.


I guess it comes down to how the program you are using wants you to format priors. The above puts them into log odds, equivalent to the beta coefficientts. And as you probably noticed, your priors seem pretty close to the null and have reasonable variance, so they will likely pull any non-null estimates down toward the null.
 
#6
Wow, that was amazing. I don't think I have that in my notes.:)

The SD = 0.0126925, so the variance is that number squared (0.0001611). If that is the case, my priors don't have reasonable variance. Am I missing something? I mean, I know I am because I don't fully understand the 1/variance. Any insight there? I promise I won't bother you too much more after this!!

Thank you so much for your time and feedback. I really appreciate it!
 

hlsmith

Omega Contributor
#7
To my knowledge, precision is just another measure of dispersion some programs may use. Ignore it if you haven't seen it before.


Bug me all you want, I need to better hone this stuff myself. I have only used Bayes logistic regression once a couple of months ago. But, I plan to incorporate it in the future as relevant projects arise. I am in the medical field, so most outcomes I have are binary, but I am looking forward to trying it out with other outcomes. Poisson didn't see too hard.


Yeah, per the thread link I posted, I spent a whole day trying to figure it out myself, so I hear any struggles you have. I think a paper by Andrew Gelman may have also supported that variance calculation. I think there is just some basic logic behind it related to the number of standard deviations perhaps.


I meant your variance seams reasonable since non-informative priors for odds ratios are typically mean 0 and variance 1000+, and yours are pretty tight or small. Though the effect itself is fairly small or null-ish.


What program are you going to use? I used SAS, but I need to carve out some time to write out and figure how to do it in R feeding into JAGS.
 
#9
So sorry about the delay!

I use SAS and Mplus. I am NO statistician, so I like Mplus. I feel like there are a lot of default options and you just have to adjust what you need to for a particular analysis.

Thank you again for your response and calculations!!