def transform_hr(t, lamda):
 def _check_args(lamda):
  cond = (lamda > 0)
  return cond
 if (not np.all(_check_args(lamda))):
  raise ValueError('invalid args')
 term = ((np.log(((1.0 - t) / t)) * 0.5) / lamda)
 from scipy.stats import norm
 transf = (((1 - t) * norm._cdf((lamda + term))) + (t * norm._cdf((lamda - term))))
 return transf

def transform_hr ( t , lamda ) : def _check_args ( lamda ) : cond = ( lamda > 0 ) return cond if ( not np . all ( _check_args ( lamda ) ) ) : raise ValueError ( 'invalid args' ) term = ( ( np . log ( ( ( 1.0 - t ) / t ) ) * 0.5 ) / lamda ) from scipy . stats import norm transf = ( ( ( 1 - t ) * norm . _cdf ( ( lamda + term ) ) ) + ( t * norm . _cdf ( ( lamda - term ) ) ) ) return transf
model of huesler reiss 1989 special case: a1=a2=1 : symmetric negative logistic of galambos 1978 restrictions: - lambda in .