12.07.2015 Views

Bayes Factors for t tests and one way Analysis of Variance; in R

Bayes Factors for t tests and one way Analysis of Variance; in R

Bayes Factors for t tests and one way Analysis of Variance; in R

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>one</strong> sample or two sample t <strong>tests</strong>, as well as <strong>for</strong> <strong>one</strong> <strong>way</strong> ANOVA. The package is relatively new <strong>and</strong> isstill be<strong>in</strong>g developed, so it is only available (<strong>for</strong> now) from R-Forge. However the functions <strong>for</strong> t <strong>tests</strong> <strong>and</strong><strong>one</strong> <strong>way</strong> ANOVA are stable. The package authors are work<strong>in</strong>g on implement<strong>in</strong>g a function <strong>for</strong> apply<strong>in</strong>g<strong>Bayes</strong> factors to regression <strong>and</strong> that is likely why the package has not yet been released to CRAN.To explore some examples <strong>of</strong> <strong>Bayes</strong> factors analysis us<strong>in</strong>g the functions <strong>in</strong> the ‘<strong>Bayes</strong>FactorPCL’package, beg<strong>in</strong> by import<strong>in</strong>g some data from the web nam<strong>in</strong>g it ‘example.1’. In R, load the ‘<strong>for</strong>eign’library (necessary to import SPSS.sav files; which this example uses), then import the data, <strong>and</strong> then get asummary <strong>of</strong> the data if desired.Next, load the ‘Rcmdr’ <strong>and</strong> ‘ab<strong>in</strong>d’ packages us<strong>in</strong>g: library(Rcmdr) <strong>and</strong> library(ab<strong>in</strong>d) <strong>in</strong> the console. Wewill need these packages <strong>for</strong> the ‘numSummary’ functions (used below) which display descriptivestatistics <strong>in</strong><strong>for</strong>mation <strong>in</strong> a cross-tabs manner.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!