List of Released Rfuncs
(many more coming!)
(many more coming!)
FitterJitter()
A jitter function that is fitter (better) than base R's jitter() function.
A jitter function that is fitter (better) than base R's jitter() function.
HDquantile()
Harrell-Davis estimates for quantiles (percentiles) with confidence intervals obtained using bias-corrected accelerated (BCa) bootstrapping. Example 4 is a small Monte Carlo study.
Harrell-Davis estimates for quantiles (percentiles) with confidence intervals obtained using bias-corrected accelerated (BCa) bootstrapping. Example 4 is a small Monte Carlo study.
iRCSplines()
Makes predictor variables, X.1, X.2, ... to include in linear models in order to fit interpretable restricted cubic spline (iRCS) functions, Y ~ f(X), where X and Y are, in theory, continuous.
Makes predictor variables, X.1, X.2, ... to include in linear models in order to fit interpretable restricted cubic spline (iRCS) functions, Y ~ f(X), where X and Y are, in theory, continuous.
MeanExp()
Maximum likelihood estimate and exact confidence interval for the mean of X ~ exponential(rate=1/TrueMean), perhaps with Type II right censoring. X often represents a "survival" time. Example 2 is an extensive lesson in statistical planning.
Maximum likelihood estimate and exact confidence interval for the mean of X ~ exponential(rate=1/TrueMean), perhaps with Type II right censoring. X often represents a "survival" time. Example 2 is an extensive lesson in statistical planning.
PlotDirector()
Instructs R to display the next plot in a separate graphics window appropriate for the operating system being used (Windows, Mac, or Linux), or build a graphics file in PDF, JPG, PNG, or SVG format.
Instructs R to display the next plot in a separate graphics window appropriate for the operating system being used (Windows, Mac, or Linux), or build a graphics file in PDF, JPG, PNG, or SVG format.
Toothpics()
Guided by Edward Tufte's timeless principles for excellence in data graphics, this plots a continuous Y variable versus a nominal Group variable. The plotting symbol is a thin line—a "toothpick"—which enables a large number of Y values to be individually discerned and facilitates group comparisons.
Toothpics() works in synergy with FitterJittter() and PlotDirector(), which are required to run the examples.
Guided by Edward Tufte's timeless principles for excellence in data graphics, this plots a continuous Y variable versus a nominal Group variable. The plotting symbol is a thin line—a "toothpick"—which enables a large number of Y values to be individually discerned and facilitates group comparisons.
Toothpics() works in synergy with FitterJittter() and PlotDirector(), which are required to run the examples.
WMW()
The Wilcoxon-Mann-Whitney (WMW) method compares two groups with respect to an ordered categorical variable, Y. Letting Y1 and Y2 be the Y values for the two groups, the fundamental WMW parameter is
WMWprob = Prob[Y1 > Y2] + Prob[Y1 = Y2]/2
or, using odds scaling,
WMWodds = WMWprob/(1 - WMWprob).
WMW() computes the estimates and confidence intervals (two-sided or one-sided) for WMWprob and WMWodds. Optionally, setting a specific value for the null hypothesis begets a p-value congruent with the CI. The returned Qscores (transforms of Y1 and Y2) enable plotting the data in a manner consistent with WMWprob. A rich set of examples explores various applications, including performing statistical planning assessing how a planned CI might work with given research goals, study design, and total sample size.
The Wilcoxon-Mann-Whitney (WMW) method compares two groups with respect to an ordered categorical variable, Y. Letting Y1 and Y2 be the Y values for the two groups, the fundamental WMW parameter is
WMWprob = Prob[Y1 > Y2] + Prob[Y1 = Y2]/2
or, using odds scaling,
WMWodds = WMWprob/(1 - WMWprob).
WMW() computes the estimates and confidence intervals (two-sided or one-sided) for WMWprob and WMWodds. Optionally, setting a specific value for the null hypothesis begets a p-value congruent with the CI. The returned Qscores (transforms of Y1 and Y2) enable plotting the data in a manner consistent with WMWprob. A rich set of examples explores various applications, including performing statistical planning assessing how a planned CI might work with given research goals, study design, and total sample size.
Miscellaneous Utility Rfuncs()
Developing regular Rfuncs sometimes involves creating smaller utility functions. Those that seem useful on their own have been upgraded to Rfuncs.
Developing regular Rfuncs sometimes involves creating smaller utility functions. Those that seem useful on their own have been upgraded to Rfuncs.
- EasyWeibullParms()
An easy way for mere humans to specify the Weibull(a,b) distribution as parameterized in base R/stats by dweibull(), pweibull(), etc. Comments within this Rfunc's code summarize the theory. The final example (#5) deals with a Monte Carlo study to perform a sample-size analysis of a Cox-model survival analysis with right-censoring. - FitterFormat()
A fitter (better) general formatter. Converts numeric X objects, including matrices, to character objects with elements having the same reasonable number of decimal places. P-values are handled appropriately, too, e.g. 0.0001234 and 0.99912 are by default transformed to <0.001 and >0.999, respectively. Values may also be re-expressed using scientific notation with the form "1.2 x 10^-8" rather than R's customary "1.23456e-08". See the many examples.