Archive for May, 2010

h1

JAGS and rjags for Fedora 13 64 bit

May 30, 2010

Unfortunately, JAGS is not in the Fedora repositories. However, it is very easy to install. This is a short how-to for installing JAGS and rjags for Fedora 13 64 bit and it should work for any 64 bit UNIX based OS. As a prerequisite, make sure you have the dependencies for JAGS installed (this is for Fedora only).

yum install R R-devel libblas-devel

Next thing you’ll want to do is to download the tarball and unpack it .

tar xvzf JAGS*

Next you need to tell it to install the libraries in /usr/local/lib64 otherwise you’ll need to tell rjags where to look for JAGS.

./configure --libdir=/usr/local/lib64
make
sudo make install

Next you can test that JAGS installed properly by typing:

jags

Once this is done, fire up R and install rjags like any other package and that’s it.

R
install.packages("rjags")

h1

GNU IceCat for Debian Squeeze 64 bit

May 25, 2010

I decided that I wanted a newer version of Firefox than 3.5.9 that was presently in Debian Squeeze. I read elsewhere that this would be the version that Squeeze would be shipping (Iceweasel 3.5.x) with and not Firefox 3.6.x. So I decided to roll my own. Rather then roll out the newer version of Iceweasel, I thought I would try GNU IceCat. I packaged up 3.6.3 for Squeeze 64 bit and if you’re interested you can download the 64 bit package here. I plan to continue to update this package if people are interested. Please let me know if you find it useful.

h1

MCMC CFA talk and update

May 21, 2010

As promised, here is my talk on how to run a Markov Chain Monte Carlo confirmatory factor analysis model in JAGS. Click here to download the talk. The talk is pretty complete. It provides a brief background on Bayesian, MCMC, CFA, and then some JAGS code. It also includes my tested model (using graphviz).

Feel free to leave comments on the talk.

This summer I am in the process of going through and reading Gelman’s Bayesian textbook. Last summer I worked through Bradley Carlin’s book and a few other books. I plan to adapt his code, especially the hierarchical modeling code, from BUGS to JAGS and I may post it here.

Also, it should be noted that all of my materials presented on this blog, including attachments, are released under a Creative Commons license or GNU GPL 3. Feel free to modify and distribute my materials as specified under the terms of these licenses.

h1

Profile Analysis in R

May 7, 2010

I recently wrote a few functions to perform a profile analysis in R. These functions are used to identify the criterion pattern and run a cross-validation (see Davision & Davenport, 2002). I’ve thought about getting serious about this and trying to clean up my code, add some new features (such as MCMC), and submit it to CRAN. Please test the script (& documentation) and if you do profile analysis let me know what you think and if you think I should add some other features. I’d be happy to do it but since I am primarily interested in Bayesian statistics, multilevel modeling, and latent modeling, I don’t have a lot of interest in maintaining and developing a profile analysis R package unless their is interest from the community as it’s not my own research interest.

This script is available here and the manual is available here .

The script contains two functions:

criterion.pattern()


profile.cv()

And you should source the script at the start of a R session:
source("/path/to/profile_analysis-0.1.R")