d******1 发帖数: 92 | 1 if I have generate a normal sample A with mean 0, variance 100, and size 100
, which is:
b<-rnorm(100,0,10)
if I want to calculate: sum(A1 to A100 )/sqrt(var(A1 to A100 )) as B1
and then calculate : sum(A2 to A101 )/sqrt(var(A2 to A101 )) as B2
and then calculate : sum(A3 to A102 )/sqrt(var(A3 to A103 )) as B3
as so on until do 100 times to get B100, and create B as vector of length
100
how to write R code , please help, wait to save my life | R*********r 发帖数: 225 | 2 没看懂,100个sample,哪里来的A101?
100
【在 d******1 的大作中提到】 : if I have generate a normal sample A with mean 0, variance 100, and size 100 : , which is: : b<-rnorm(100,0,10) : if I want to calculate: sum(A1 to A100 )/sqrt(var(A1 to A100 )) as B1 : and then calculate : sum(A2 to A101 )/sqrt(var(A2 to A101 )) as B2 : and then calculate : sum(A3 to A102 )/sqrt(var(A3 to A103 )) as B3 : as so on until do 100 times to get B100, and create B as vector of length : 100 : how to write R code , please help, wait to save my life
|
|