Skip to content
Back to formatted view

Raw Message

Message-ID: <1296401816916-3247261.post@n4.nabble.com>
Date: 2011-01-30T15:36:56Z
From: Pete Brecknock
Subject: Finding  the correlation coefficient of two stocks
In-Reply-To: <1296385692359-3247042.post@n4.nabble.com>

Dieter is correct, the lengths of the 2 series are different

Try ....

s = merge(s1,s2)

corr = cor(s[,"Close.s1"],s[,"Close.s2"],use="pairwise.complete.obs")

print(corr)

HTH

Pete
-- 
View this message in context: http://r.789695.n4.nabble.com/Finding-the-correlation-coefficient-of-two-stocks-tp3246992p3247261.html
Sent from the R help mailing list archive at Nabble.com.