作者sjgau (sjgau)
看板Fortran
标题Re: [问题] X(ij)=M+b(i)+e(ij) i=1...I,j=1...J
时间Tue Sep 16 06:48:45 2008
http://tinyurl.com/5td6ee
RNNOR
Generates pseudorandom numbers from a standard normal distribution using an
inverse CDF method.
Required Arguments
R — Vector of length NR containing the random standard normal deviates.
(Output)
Optional Arguments
NR — Number of random numbers to generate. (Input)
Default: NR = size (R,1).
FORTRAN 90 Interface
Generic: CALL RNNOR (R [,…])
Specific: The specific interface names are
S_RNNOR and D_RNNOR.
FORTRAN 77 Interface
Single: CALL RNNOR (NR, R)
Double: The double precision name is DRNNOR.
Description
※ 引述《hyekyo0608 (鱼)》之铭言:
: 我要做的是单因子随机效应的模型
: X(ij)=M+b(i)+e(ij)
: where X(ij)is the jth observation from ith batch,
: the b(i) and e(ij) are mutually independent normally distributed random
: variables with E(bi)=E(eij)=0 and variances b^2 and w^2
: 我要用fortran产生X(ij)
: OUTTER:DO NI=1,I
: CALL DRNNOR(NR,B)
: M(NI)=B*(DSORT(R))
: INNTER1:DO NJ=1,Jn
: CALL DRNNOR(NR,S)
: E(NI,NJ)=S
: X(NI,NJ)=M(NI)+E(NI,NJ)
: END DO ONNTER1
: END DO OUTTER
: 我想请问一下这个写法是在产生X(ij)吗?
: 可是我看不懂CALL DRNNOR(NR,B)
: 是说叫出NR个N(0,1)? 那B的意思是什麽?
: CALL DRNNOR(NR,S)
: E(NI,NJ)=S
: 一样S的部份不懂?
: 然後为啥E(NI,NJ)=S?
: 最後最後X(NI,NJ)=M(NI)+E(NI,NJ)是不是就是我要的模型X(ij)=M+b(i)+e(ij)??
: 拜托拜托
: 好心的FORTRAN 高手们
: 帮我解决我的疑难,我困扰好久了
: 拜托拜托!!!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 118.231.129.227