Re: [R] 'stretching' a binomial variable
On 3/27/2009 7:49 AM, imicola wrote: Hi, Im carrying out some Bayesian analysis using a binomial response variable (proportion: 0 to 1), but most of my observations have a value of 0 and many have very small values (i.e. 0.001). I'm having troubles getting my MCMC algorithm to converge, so I have decided to try normalising my response variable to see if this helps. It seems to me that the problem in a situation like this is with the algorithm, not with the data. Can't you modify it to get better convergence? For example, set your target to be the square root of your posterior (or some other power between 0 and 1); this is more diffuse, so it's easier to sample from. Then use importance sampling to reweight the sample. Duncan Murdoch I want it to stay between 0 and 1 but to have a larger range of values, or just for them all to be slightly higher. Does anyone know the best way to acheive this? I could just add a value to each observation (say 10 to increase the proportion a bit, but ensuring it would still be between 0 and 1) - would that be ok? Or is there a better way to stretch the values up? Sorry - i know its not really an R specific question, but I have never found a forum with as many stats litterate people as this one :-) Cheers - any advice much appreciated! nicola __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] 'stretching' a binomial variable
At 06:49 AM 3/27/2009, imicola wrote: Hi, Im carrying out some Bayesian analysis using a binomial response variable (proportion: 0 to 1), but most of my observations have a value of 0 and many have very small values (i.e. 0.001). I'm having troubles getting my MCMC algorithm to converge, so I have decided to try normalising my response variable to see if this helps. I want it to stay between 0 and 1 but to have a larger range of values, or just for them all to be slightly higher. Does anyone know the best way to acheive this? I could just add a value to each observation (say 10 to increase the proportion a bit, but ensuring it would still be between 0 and 1) - would that be ok? Or is there a better way to stretch the values up? Sorry - i know its not really an R specific question, but I have never found a forum with as many stats litterate people as this one :-) Cheers - any advice much appreciated! nicola Work with events instead of proportions, and use a Poisson model. Robert A. LaBudde, PhD, PAS, Dpl. ACAFS e-mail: r...@lcfltd.com Least Cost Formulations, Ltd.URL: http://lcfltd.com/ 824 Timberlake Drive Tel: 757-467-0954 Virginia Beach, VA 23464-3239Fax: 757-467-2947 "Vere scire est per causas scire" __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] 'stretching' a binomial variable
Hi, Im carrying out some Bayesian analysis using a binomial response variable (proportion: 0 to 1), but most of my observations have a value of 0 and many have very small values (i.e. 0.001). I'm having troubles getting my MCMC algorithm to converge, so I have decided to try normalising my response variable to see if this helps. I want it to stay between 0 and 1 but to have a larger range of values, or just for them all to be slightly higher. Does anyone know the best way to acheive this? I could just add a value to each observation (say 10 to increase the proportion a bit, but ensuring it would still be between 0 and 1) - would that be ok? Or is there a better way to stretch the values up? Sorry - i know its not really an R specific question, but I have never found a forum with as many stats litterate people as this one :-) Cheers - any advice much appreciated! nicola -- View this message in context: http://www.nabble.com/%27stretching%27-a-binomial-variable-tp22740114p22740114.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.