Skip to content
Back to formatted view

Raw Message

Message-ID: <1354300442427-4651475.post@n4.nabble.com>
Date: 2012-11-30T18:34:02Z
From: jaybell
Subject: Choleski decomposition

m <- matrix(nrow=5, ncol=5)
	m <- ifelse(row(m)==col(m), 1, 0.2)
	c <- chol(m)	# Choleski decomposition
	u <- matrix(rnorm(2000*5), ncol=5)
	uc <- u %*% c
	cr <- pnorm(uc)
	cr <- qbinom(cr,1,0.5)
	cor(cr) 
I expected that the cor(cr) to be 0.2 as i set in m, but the result is
around 0.1.
Why is that? Thanks



--
View this message in context: http://r.789695.n4.nabble.com/Choleski-decomposition-tp4651475.html
Sent from the R help mailing list archive at Nabble.com.