[R] Help with Book example of Matrix application

2012-04-09 Thread James Lenihan
I found this example in an Introductory R book in the chapter on Matrices and Arrays The array is > m [,1] [,2] [,3] [,4] [,5] [1,]0 12 138 20 [2,] 120 15 28 88 [3,] 13 15069 [4,]8 2860 33 [5,] 20 889 330 The code is

[R] BUGS

2009-08-19 Thread James Lenihan
I am running a BUGS function with following   schools.sim <-bugs(data,inits, parameters, model.file="schools.txt", n.chains=3, n.iter=1000, bugs.director

[R] Bayesian data analysis - help with sampler function

2009-08-18 Thread James Lenihan
I have downloaded the Umacs (Universal Markov chain sampler) and submitted the following sample code from Kerman and Gelman.   s <-Sampler( J=8, sigma.y  =c(15,10,16,11,9,11,10,18),   y  =c(28, 8,-3,7,-1,1,18,12), theta =Gibbs(theta.update,theta.init),   V =Gibbs(V.update,mu.i

[R] a loop for boxplot graphs

2009-03-29 Thread James Lenihan
Dear Colleagues   I have the following code that generates a boxplot for one specific labtest:   boxplot.n(LBSTRESN~COHORT, main="Boxplot of laboratory data for XLXXX-XXX test=Creatinine", subset = LBTEST=="Creatinine", xlab = "Cohort Number", ylab = "Units = umol/L", varwidth=TRUE   I would lik

[R] sm.density.compare

2009-03-03 Thread James Lenihan
I am running the sm.density.compare function amd I am getting the following error:   my code is  > sm.density.compare(LBSTRESN,COHORT,xlab="Units = umol/L"subset = LBTEST=="Creatinine")   Error in if (from == to) rep.int(from, length.out) else as.vector(c(from,  :   missing value where TRUE/FALS