
Hi all,

 

Does anyone know how to get the independent components and loadings from an Independent Component Analysis (ICA), as well as principal components and loadings from a Pricipal Component analysis (PCA) using the fastICA package? Or perhaps if there's another way to do ICAs in R?


Below is an example from the fastICA manual (http://cran.r-project.org/web/packages/fastICA/fastICA.pdf)

 

if(require(MASS))
{
     x <- mvrnorm(n = 1000, mu = c(0, 0), Sigma = matrix(c(10, 3, 3, 1), 2, 2))
     x1 <- mvrnorm(n = 1000, mu = c(-1, 2), Sigma = matrix(c(10, 3, 3, 1), 2, 2))
     X <- rbind(x, x1)
     a <- fastICA(X, 2, alg.typ = "deflation", fun = "logcosh", alpha = 1, method = "R", row.norm = FALSE, maxit = 200, tol = 0.0001, verbose = TRUE)
     par(mfrow = c(1, 3))
     plot(a$X, main = "Pre-processed data")
     plot(a$X%*%a$K, main = "PCA components")
     plot(a$S, main = "ICA components")
}

 

Best regards,

 

Joel
 		 	   		  
_________________________________________________________________
Hitta kärleken i vinter!
http://dejting.se.msn.com/channel/index.aspx?trackingid=1002952
	[[alternative HTML version deleted]]


