Description Usage Arguments Examples

Simulates realisations from the posterior distribution for the population mean, random effect means and precision components in a one-way normal random effects model with a semi-conjugate prior

1 | ```
gibbsReffects(N, initial, priorparam, m, n, ybar, s)
``` |

`N` |
length of MCMC chain |

`initial` |
starting values for the population mean and the precision components |

`priorparam` |
prior parameters a,b,c,d,e,f |

`m` |
number of treatments |

`n` |
vector containing the number of observations on each treatment |

`ybar` |
vector containing the mean of observations on each treatment |

`s` |
vector containing the standard deviation of observations on each treatment |

1 2 3 4 5 | ```
data(contamination)
n=tapply(contamination$acc,contamination$keyboard,length)
ybar=tapply(contamination$acc,contamination$keyboard,mean)
s=sqrt(tapply(contamination$acc,contamination$keyboard,var)*(n-1)/n)
mcmcAnalysis(gibbsReffects(N=100,initial=c(200,2e-5,1),priorparam=c(200,0.1,0.1,0.1,0.1,0.1),m=10,n=n,ybar=ybar,s=s))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.