107
where rww is calculated as below.
cy < — function(x,y,alphaa){
a < — alphaa^x
b < — alphaa^y
СУУ < ~ b*(a-l)∕(alphaa-l+(a-l)*(b-l))
return(cyy) }
ex < — function(x,y,alphaa){
a < — alphaa^x
b < — alphaa^y
cxx < — a*(b-l)∕(alphaa-l+(a-l)*(b-l))
return(cxx) }
rw.fnc < — function(deltaln,delta2n,ff,gg,alphaa) {#30
rw.f < — matrix(NA,n,n)
rwc.f < — matrix(NA,n,n)
for(i in l:n) {#33 # subject i
for (j in l:n) {#34 # time j
if (i >= j) {#35
rw.f[i,j] < - 1;
rwc.f[i,j]< - 1}#35
if (i < j) { #36
if (deltain[i]==1) {#37