Description Usage Arguments Details Value References Examples

This function returns the bin midpoints for use in calculating midpoint-based statistics. The code is not written to handle left censored bins or more than one right censored bins.

1 | ```
getMids(ID, hb, lb, ub, alpha_bound)
``` |

`ID` |
A vector of group IDs |

`hb` |
A vector of heights for each bin |

`lb` |
A vector of lower bounds, which must all be real numbers. |

`ub` |
A vector of upper bouns, which can have one censored bin per group. |

`alpha_bound` |
A numeric value indicating the bound on alpha for determining the midpoint of the upper-most, censored bin. To unbound the value of alpha, set alpha_bound = numeric(0). |

For all non-censored bins, ie real number upper and lower bounds, the midpoint is simply the arithemtic mean of the bounds. This assumes the number of observations are normally distributed in each bin. However, for the right-censored bin we relax this assumption when calcuting the bin midpoint. FIXME - say something about the method we use to calculate midpoint of the upper bin.

returns a list with the following elements:

FIXME - references

1 2 3 4 5 6 7 8 9 | ```
data(state_bins)
bin_mids <- getMids(ID = state_bins[,'State'], hb =
state_bins[,'hb'], lb = state_bins[,'bin_min'], ub =
state_bins[,'bin_max'], alpha_bound = 10/9)
bin_mids_unbound <- getMids(ID = state_bins[,'State'], hb =
state_bins[,'hb'], lb = state_bins[,'bin_min'], ub =
state_bins[,'bin_max'], alpha_bound = numeric(0))
``` |

binequality documentation built on Feb. 19, 2018, 1 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.