SS.oneway.bf {ldDesign}R Documentation

Bayes factors for one-way analysis of variance models.

Description

Function to calculate the Bayes factor for a one-way analysis of variance layout with vague or improper priors.

Usage

SS.oneway.bf(group.sizes, Fstat)

Arguments

group.sizes Sizes of groups in the one-way layout
Fstat F statistic obtained

Details

The function the Bayes factor corresponding to a given F statistic in a one-way analysis of variance model is calculated using the method of Spiegelhalter and Smith 1982. With improper priors the marginal probabilities of the data under each of the models (corresponding to the NULL and alternative hypotheses) is indeterminate. This is resolved by updating each prior with a small imaginary training sample, which is equivalent to normalising the Bayes factor to be 1 for the small training sample. Spiegelhalter and Smith obtain a formula for the Bayes factor in terms of the classical F value.

Value

Returns the Bayes factor corresponding to the given design and observed value of F statistic.

Author(s)

Rod Ball rod.ball@forestresearch.co.nz www.forestresearch.co.nz

References

Spiegelhalter, D. and A.F.M. Smith 1982 Bayes factors for linear and log-linear models with vague prior information J. Royal Statist Soc. B 44: 377–387.

See Also

oneway.bf.alpha,oneway.bf.alpha.required

Examples

# Bayes factors corresponding to P-values 0.05,0.01,0.001,0.0001 for n=200
SS.oneway.bf(group.sizes=c(50,100,50),Fstat=qf(0.95,2,197))
SS.oneway.bf(group.sizes=c(50,100,50),Fstat=qf(0.99,2,197))
SS.oneway.bf(group.sizes=c(50,100,50),Fstat=qf(0.999,2,197))
SS.oneway.bf(group.sizes=c(50,100,50),Fstat=qf(0.9999,2,197))

[Package ldDesign version 1.1-0 Index]