Description Usage Arguments Details Value Author(s) See Also Examples

Rank by size and deviance from the hypothesized mean.

1 2 3 |

`X` |
A numeric vector. |

`INDEX` |
A factor of length |

`alternative` |
The alternative hypothesis. Accepts |

`absrank` |
If |

`N` |
The number of observations below which a growth penalty is applied. |

`b` |
A positive numeric value representing the growth rate of the |

`plotpenalty` |
If |

`allowed.error` |
The allowed difference between |

`qqrank`

ranks by size and deviance from the hypothesized mean using either the Binomial Test or Welch's t-Test. Restated, `qqrank`

is a function of a size penalty, test statistic or variant thereof, and p-value.

`qqrankmatrix` |
A data frame containing the size, mean, standard deviation, and qqrank of each |

`test.used` |
The statistical test used to measure deviance from the mean. |

`pop.mean` |
The mean of |

`pop.sd` |
The standard deviation of |

Robert P. Bronaugh

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ```
# which hospital has the "worst" readmissions? (note: the average
# readmission rate is 17.13%
data(ipadmits)
attach(ipadmits)
ip.ag = data.frame('sum' = tapply(ipadmits$isReadmission,ipadmits$HospID,sum),
'avg' = tapply(ipadmits$isReadmission,ipadmits$HospID,mean))
# hospital 9 has the most readmissions (1,094), but the percent of readmissions
# is low at 14%, less than the population average.
ip.ag[order(-ip.ag$sum),][1,]
# hostpital 80 has the highest percentage of readmissions 87.5%, but only
# 7 readmissions over all.
ip.ag[order(-ip.ag$avg),][1,]
# using qqrank and penalizing samples less than N = 250 at a growth
# rate of b = 0.05, Hospital 39 has 1606 readmissions with a readmission
# percent of 38%.
qqr = qqrank(ipadmits$isReadmission,ipadmits$HospID
,alternative = "greater",N = 250, b = 0.05)
round(qqr$rankmatrix,2)
# relax sample penalty and rank on both sides of the mean
# Hospital 21 has the "best" readmission track record.
qqr = qqrank(ipadmits$isReadmission,ipadmits$HospID
,alternative = "two.sided",absrank = FALSE,N = 30, b = 0.1)
round(qqr$rankmatrix,2)
detach(ipadmits)
``` |

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.