Dear Dr Kruschke, I read your book Doing Bayesian Data Analysis and I found
it very wellwritten and terribly interesting, something which I felt compelled
to share on Goodreads (see my short review here: http://www.goodreads.com/book/show/9003187doingbayesiandataanalysis). I was wondering if you can help
me with some results I am getting when applying Bayesian analysis to contingency
tables. Tables 1 and 2 show the results of a simple ChiSquare test for a
sample of 129 people. The idea behind this test is to understand whether there
are significant differences in how male and female consumers
took different paths in the types of websites they visited while researching a particular
product on the Internet. Usually I look at the adjusted residual to see where the differences
are, and in this case there are three instances where the adjusted residuals
are outside the ±1.96 threshold. I used the same data with your code (PoissonExponentialJagsSTZ.R), but I
am not getting any parameter with values credibly different than zero (see the
code at the end of this email in case you would want to look at the results for
yourself). Is this because the sample is quite small (particularly for all the
categories other than “Search > Brands”)? I am looking forward to hearing from you. Paul Scutti Table 1: Types of Internet paths by sex
Table 2: ChiSquare tests
# THE DATA. # Specify data source: dataSource = c( "PathsSex" , "CrimeDrink" , "Toy" )[1] # Load the data: if ( dataSource == "PathsSex" ) { fileNameRoot = paste( fileNameRoot , dataSource , sep="" ) dataFrame = data.frame( # from Snee (1974) Freq = c(25,11,4,10,5,5,41,3,10,4,6,5) , Sex = c("Male","Male","Male","Male","Male","Male","Female","Female","Female","Female","Female","Female"), Paths = c("Search > Brands","Search > Brands > Aggregator","Search > Aggregator > Brands","Brands","Brands > Search","Search > Brands > Research","Search > Brands","Search > Brands > Aggregator","Search > Aggregator > Brands","Brands","Brands > Search","Search > Brands > Research") ) y = as.numeric(dataFrame$Freq) x1 = as.numeric(dataFrame$Sex) x1names = levels(dataFrame$Sex) x2 = as.numeric(dataFrame$Paths) x2names = levels(dataFrame$Paths) Ncells = length(y) Nx1Lvl = length(unique(x1)) Nx2Lvl = length(unique(x2)) normalize = function( v ){ return( v / sum(v) ) }
} 
Administrator

Hi. Just some quick thoughts: With the small N and large number of cells, it would take big differences for them to show up as a credibly nonzero. John K. Kruschke, Professor
Doing Bayesian Data Analysis The book: http://www.indiana.edu/~kruschke/DoingBayesianDataAnalysis/ The blog: http://doingbayesiandataanalysis.blogspot.com/ On Wed, Aug 14, 2013 at 8:38 PM, paulscutti [via Doing Bayesian Data Analysis] <[hidden email]> wrote:

Free forum by Nabble  Edit this page 