search for: mclustsim

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

Did you mean: mclustbic
2009 Nov 27
1
generating a matrix after a for loop..
...r googling and reading "An introduction to R". So i have return data 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:...