demo/HfFunctions/hf_example.R

hf_example = function(bl, history, t){
  r_sr<-0.0000000123 - bl["Age"]/1000000*(2-(bl["Sex"]))
  res<-r_sr+0*t
  p<--0.3*(sum(history)+t)+0.3
  res[sum(history)+t<1]<- max(-log(1-p)/(sum(history)+t), r_sr)
  return(res)
}

Try the GUIgems package in your browser

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

GUIgems documentation built on May 29, 2017, 11:03 a.m.