Description Usage Arguments Details Value Examples

`coef2rate`

is designed to convert regression
coefficients back to the good/bad rates for each group and variables,
so that the non-technical audience can understand it easily.
The coef2rate function works in two different ways dependent on whether
force.change is FALSE or TRUE.

1 |

`model` |
The model object |

`data` |
The data used to calculate the rates |

`stat` |
The statistics output from the |

`force.change` |
Whether to force the model to use all data, and change the value in each variable to be one of its levels. |

`time` |
The length of time to predict. It is only required in survival model. |

If force.change is set to FALSE, the function will estimate the predicted value for each record of the given data using the given model. Then, average the predicted value for each group and variable.

If the force.change is set to TRUE, the function will go through each predictor, force the value in this predictor to be one of its group and keep all other predictors unchanged, and then calculate the predicted value for each record. By averaging the values for all record, we get a single Pred.Rate.1 for the given group and predictor. We can get the average predicted value for all groups and predictors, by going through them one by one. The idea behind force.change originates from the interpretation of regression coefficients - keep all other variables unchanged, and only change the value for one predictor. By doing this, we can get the pure effect of that variable.

The predicted rates for each group and variable, together with the frequency of records in each group, and the information value passed to the stat argument.

1 2 3 4 5 |

JianhuaHuang/streamlineR documentation built on Aug. 19, 2018, 6:59 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.