search for: numberofsim

Displaying 1 result from an estimated 1 matches for "numberofsim".

2009 Nov 27
1
generating a matrix after a for loop..
...from 30 instruments and I am fitting a mixture of normal distributions for the asymmetric marginal distributions and then simulating from those distributions. For this I have tried to build a function as below "mclustSim" <- function(x){ library(mclust) nr=dim(x)[1] nc=dim(x)[2] NumberOfSim=100 for (i in 1:nc){ y<-Mclust(as.matrix(x[,i])) z<-sim(modelName=y$modelName,parameters=y$parameters,n=NumberOfSim) #print(c(colnames(x[i]),z[,2]),digits=3) } } z is the simulated return series. How can I say: "print z next to previous z and form a matrix" How could I get an mat...