[R] the function doesn´t work
jethi
kartija at hotmail.com
Sun Sep 26 22:50:09 CEST 2010
thanks a lot for ur patience and understandig, josh. ok perhaps it would be
help me to change my programm by step by step. the first important thing of
my programm is to caluculate the correlation of each block of a radom
variable.
so i have a n bivariate random sample wich i saperate in m blocks and
calculate the correlation. i designe a matrix for that. so that i watch not
one n bivariate random sample, but N bivariate random sample. (its important
to watch a matrix because for my powerfunction later)
so i programm my correlationfunction like that
N=10
n=100
m=5
k=n/m
l=matrix(0,nrow=m,ncol=N)
for(i in 1:N){
for(j in 1:m){
x=rnorm(n,0,0.5)
y=rnorm(n,0,0.8)
l
l[j,i]=cor((x[(((j-1)*k)+1):(((j-1)*k)+k)]),
(y[(((j-1)*k)+1):(((j-1)*k)+k)]))
}
}
i think their is a mistake, am i right? if i watch this matrix, i don´t
exactliy know which correlations are to which random sample, do i? i hope u
have still time to help me.
regards
jethi
--
View this message in context: http://r.789695.n4.nabble.com/the-function-doesn-t-work-tp2714105p2714702.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list