R/S02.fun.R

S02.fun <-
function(ord.bz,Rt,r,n,ord.wt){
    Rt0 = c(0,Rt[1:(n-1)])
    s0 = numeric(n)
    
    for(i in 1:n){
          a = ord.wt*exp(-ord.bz)/(1+r*Rt0[i]*exp(-ord.bz))
          s0[i] = sum(a[i:n])
    }
    return(s0)  
}

Try the TransModel package in your browser

Any scripts or data that you put into this service are public.

TransModel documentation built on May 2, 2019, 6:13 a.m.