A change from "unsubscribe..."
Dear Martin,
the poisson distribtuon for v allows a zero in its range of values
whereas a binomial denominator for n must be larger than zero.
Similarly, ns may currently has a range that may include negative values.
Does v need to be bounded below by 15?
Given that this seems a 'non-standard' model (varying binomial denominators
as well as proportions), it may be worth checking whether the model is
feasible given the amount of data and the support the data has for each
parameter, by writing down each univariate conditional. This may throw
light on the problem and other choices of prior distributional form. The
univariate conditional for v is particularly ugly with the present prior.
Is there an alternative (non-MCMC) method for solving this problem?
Best of luck,
Toby
At 18:47 18/11/98 -0500, you wrote:
>Dear list-members:
>
>I want to analyze, using BUGS, the following problem:
>
>I have three variables: n, r, and s.
>n is binomial(v,a) (probability of success is a)
>Conditioning on n: r and s are independent, and
>r is binomial(n*(n-1),b), and
>s is binomial(n*(v-n),b).
>
>The observed values are: n=34, r=15 and s=296.
>
>The prior distributions for a, b, and v are:
>
>a~uniform(0,1)
>b~uniform(0,1)
>v~Poisson(700)
>
>I have written the following BUGS code:
>
> n, #initial sample size
> r, #number of nonloop arcs in the initial sample
> s, #number of arcs from the initial sample to the first wave
> b, #prob of having an arc between two specific nodes
> a, #prob of selecting a node
> v, #number of vertices
> nr, ns;
>
>data in "snowball.dat";
>inits in "snowballS.in";
>
>{
> nr <- n*n-n;
> ns <- n*v+n-nr;
> n ~ dbin(a,v);
> r ~ dbin(b,nr);
> s ~ dbin(b,ns);
> a ~ dunif(0,1);
> b ~ dunif(0,1);
> v ~ dpois(700);
>}
>
>After a burn-in period of 1000 iterations, I carried out other 1000
iterations. The results for the posterior distribution of v are the following:
>
>Bugs>stats(v)
> mean sd 2.5% : 97.5% CI median
sample
> 7.000E+2 2.688E+1 6.480E+2 7.520E+2 6.990E+2
1000
>
>which means that the posterior distribution of v is the same as its prior
distribution ! Could someone of you explain to me what is happening. I
think that my BUGS code is incorrect, but I do not know what the mistake is.
>
>Thanks
>Martin Felix
>e-mail: [log in to unmask]
Dr. A.T.Prevost
Centre for Applied Medical Statistics
Department of Community Medicine
Institute of Public Health
University Forvie Site
Robinson Way, Cambridge CB2 2SR
Tel: 01223 330593 Fax: 01223 330330
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|