Description Usage Arguments Details Value Author(s) References Examples

This function runs a Bayesian analysis of variance (ANOVA) on the data. The Bayesian ANOVA model assumes normally distributed data in all three groups, and conducts inference based on a Gibbs sampler in a three-component Gaussian-mixture with unknown parameters.

1 2 |

`n` |
Number of posterior draws the Gibbs sampler produces. The default is |

`first` |
Numerical vector containing the values of the first group |

`second` |
Numerical vector containing the values of the second group |

`third` |
Numerical vector containing the values of the third group |

`fourth` |
Numerical vector containing the values of the fourth group. Default value is NULL. |

`fifth` |
Numerical vector containing the values of the fifth group. Default value is NULL. |

`sixth` |
Numerical vector containing the values of the sixth group. Default value is NULL. |

`hyperpars` |
Sets the hyperparameters on the prior distributions. Two options are provided. The default is |

`burnin` |
Burn-in samples for the Gibbs sampler |

`sd` |
Selects if posterior draws should be produced for the standard deviation (default) or the variance. The two options are |

`q` |
Tuning parameter for the hyperparameters. The default is |

`ci` |
The credible level for the credible intervals produced. Default is |

The Gibbs sampler is run with four Markov chains to run convergence diagnostics.

Returns a dataframe which includes four columns for each parameter of interest. Each column corresponds to the posterior draws of a single Markov chain obtained by the Gibbs sampling algorithm.

Riko Kelter

For details, see: https://arxiv.org/abs/1906.07524v1

1 2 3 4 5 6 7 8 9 10 | ```
set.seed(42)
x1=rnorm(75,0,1)
x2=rnorm(75,1,1)
x3=rnorm(75,2,1)
x4=rnorm(75,-1,1)
result=bayes.anova(first=x1,second=x2,third=x3)
result=bayes.anova(n=1000,first=x1,second=x2,third=x3,
hyperpars="custom",burnin=750,ci=0.99,sd="sd")
result2=bayes.anova(n=1000,first=x1,second=x2,third=x3,
fourth=x4)
``` |

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.