#NEWLINE# def params_transform_univariate( params , cov_params , link = None , transform = None , row_labels = None ) : #NEWLINE# #INDENT# '\n    results for univariate, nonlinear, monotonicaly transformed parameters\n\n    This provides transformed values, standard errors and confidence interval\n    for transformations of parameters, for example in calculating rates with\n    `exp(params)` in the case of Poisson or other models with exponential\n    mean function.\n\n    ' #NEWLINE# from statsmodels.genmod.families import links #NEWLINE# if ( ( link is None ) and ( transform is None ) ) : #NEWLINE# #INDENT# link = links . Log ( ) #NEWLINE# #UNINDENT# if ( ( row_labels is None ) and hasattr ( params , 'index' ) ) : #NEWLINE# #INDENT# row_labels = params . index #NEWLINE# #UNINDENT# params = np . asarray ( params ) #NEWLINE# predicted_mean = link . inverse ( params ) #NEWLINE# link_deriv = link . inverse_deriv ( params ) #NEWLINE# var_pred_mean = ( ( link_deriv ** 2 ) * np . diag ( cov_params ) ) #NEWLINE# dist = stats . norm #NEWLINE# linpred = PredictionResults ( params , np . diag ( cov_params ) , dist = dist , row_labels = row_labels , link = links . identity ( ) ) #NEWLINE# res = PredictionResults ( predicted_mean , var_pred_mean , dist = dist , row_labels = row_labels , linpred = linpred , link = link ) #NEWLINE# return res