File: bfindep.Rd

package info (click to toggle)
r-cran-learnbayes 2.15.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,864 kB
  • sloc: sh: 15; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 704 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
\name{bfindep}
\alias{bfindep}
\title{Bayes factor against independence assuming alternatives close to independence}
\description{
Computes a Bayes factor against independence for a two-way contingency table assuming
a "close to independence" alternative model}
\usage{
bfindep(y,K,m)
}
\arguments{
  \item{y}{matrix of counts}
  \item{K}{Dirichlet precision hyperparameter}
  \item{m}{number of simulations}
}

\value{
\item{bf}{value of the Bayes factor against hypothesis of independence}
\item{nse}{estimate of the simulation standard error of the computed Bayes factor}
}

\author{Jim Albert}

\examples{
y=matrix(c(10,4,6,3,6,10),c(2,3))
K=20
m=1000
bfindep(y,K,m)
}

\keyword{models}