R/enu.tr.R

Defines functions enu.tr

Documented in enu.tr

enu.tr <- function(vrb.st, margin){
 
 

if( !(margin %in% c("TW")) ){
 
   vrb.st <- ifelse( vrb.st > 20,   20, vrb.st ) # it was 20  # 485165195
   vrb.st <- ifelse( vrb.st < -13, -13, vrb.st ) # it was -17 # 2.260329e-06
   vrb    <- exp(vrb.st)
   
}   
   
   
   
if( margin %in% c("TW") ){
 
  aTW <- 1.001  
  bTW <- 1.999
 
   vrb.st <- ifelse( vrb.st >  15,  15, vrb.st )  
   vrb.st <- ifelse( vrb.st < -15, -15, vrb.st ) 
   vrb    <- (aTW + bTW*exp(vrb.st))/(1 + exp(vrb.st)) 
  
}   
   
   
    
    
 list(vrb = vrb, vrb.st = vrb.st )  
 
}    

Try the GJRM package in your browser

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

GJRM documentation built on May 29, 2024, 6:34 a.m.