Displaying 2 results from an estimated 2 matches for "simmean".
Did you mean:
simmen
2003 Oct 16
1
Improving efficiency in "outer"-like calculation
Hello,
I am doing mcmc=10000 simulations from a posterior distribution of the parameters
of a mixture of K=6 normal densities.
I have mcmc by K matrices simMeans, simVars and simWeights containing
the simulation output: one row for each simulation, one column for
each normal component of the mixture.
One thing I would like to do is a plot of the posterior predictive
density. In order to do that I define a vector x of points at which I
want to evaluate thi...
2003 Oct 17
1
Modifying dim attribute of elements of a list
I am creating lists of vectors withing a loop. I also would like to
change the dim attribute to the vectors in order to make them
matrices.
I have tried the following, but it doesn't work...
> sim <- c('simMeans','simVars','simWeights')
> indexTable <- table(modelIndex)
> for (i in sim) {
+ assign(tmp <- paste(i,'By',sep=''),split(get(i), modelIndex))
+ lapply(seq(along=indexTable),function(j) attr(get(tmp)[[j]],'dim') <<- c(indexTable[...