Appointments Jobs About Search Education & Research Clinical Trials Health Information Medical Services

personnel directory

more pages

S-PLUS/R Functions

Local Extensions To The S Language

All files below contain source code only, bundled and compressed to a "tar.gz" format. The first section contains packages and the last section contains useful functions that can be loaded into an S-PLUS or R session for general use. Some of the packages contain C code (armitage, haplo.stats, kinship, multic, rpart, and survival) and require a compiler. Although we realize that some users will not have the expertise or perhaps the software to do the compilation, particularly on Windows systems, we do not have the time or the necessary equipment to provide binary versions. However, many of the packages have been ported to R, and binary versions are made available on sites like the Contributed R Archives Network (CRAN). You can find package distributions below, along with a brief description, and where indicated, a readme, user manual, and a note on where it is available publicly.

Copyright 2005 Mayo Foundations for Medical Education and Research. This software is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Credit where credit is due. If you use functions from Mayo Clinic, please acknowledge the original contributor of the material.


Packages

armitage: Armitage trend chi-square statistics to evaluate the association of a trait with SNP genotype predictors given a dose vector of length 3. Distributed for S-PLUS and R with special installation steps given in the README. Version 0.0.2, updated 1/17/2008.

Download: armitage_R or armitage_S.
See the README file for details.

Haplo Stats: A suite of S-PLUS/R routines for the analysis of indirectly measured haplotypes. The statistical methods assume that all subjects are unrelated and that haplotypes are ambiguous (due to unknown linkage phase of the genetic markers). The genetic markers are assumed to be codominant (i.e., one-to-one correspondence between their genotypes and their phenotypes). Version 1.4.0, updated 10/2008.

Download: haplo.stats_R or haplo.stats_S.
See also the User Manual for details and the Readme file.
Distributions for R can also be found on CRAN.

kinship: This is a suite of interrelated routines, of which the primary ones are coxme (general mixed-effects Cox models), kinship (routines to create and manipulate n by n matrices that describe the genetic relationships between n persons), and pedigree (create and plot pedigrees). Terry Therneau & Beth Atkinson. [8/APR/2005]

Download: kinship_1.2_S.tar.gz.
See the pdf report for details.
Ported to R, can be found on CRAN.

Multic: S-PLUS/R routines for quantitative linkage analysis using variance components approach, based on the multic routines found in the package ACT. This release allows for univariate, multivariate and longitudinal endpoints and includes model diagnostic tools and easy-to-read result summaries. Mariza de Andrade, Patrick Votruba, and Beth Atkinson. [12/FEB/2007]

Download: multic_0.3.0_S.tar.gz or multic_0.3.0_R.tar.gz.
Distributions for R can also be found on CRAN.

pedShrink: Trim a pedigree to specified bit size with priority placed on trimming uninformative subjects. Version 0.1.0. Updated 7/2008.

Download: pedShrink_R
See the Readme file for details.

roc: These functions create a variety of plots associated with sensitivity and specificity, along with pairwise comparisons of the area under the curve. Beth Atkinson and Doug Mahoney [3/JUN/2004]

Download: roc3_S.tar.gz.

rpart: Recursive partitioning, an alternative to tree, allows users to create their own splitting rules using code written in Splus. Terry Therneau & Beth Atkinson [24/APR/2002]

Download: rpart3_S.tar.gz.
Ported to R by Brian Ripley. Versions for R are available on his homepage and on CRAN.

survival: These functions for survival analysis have been posted to Statlib at irregular intervals as survival (5/90), survival2 (6/91), survival3 (4/93), survival4 (10/94), and survival5 (2/99). The functions are also incorporated directly into S-Plus. The S-Plus versions are normally more up-to-date than the statlib code. Terry Therneau (therneau@mayo.edu). [23/NOV/2004]

Download: surv6.tar.gz.
Distributions for R can also be found on CRAN. It is currently part of the standard distribution of R.

 

Useful Functions

chisqpower

  

Computes power and sample size of chi-squared tests of independence. Ross Dierkhising [10/SEP/1999]

cibinom

  

Computes exact binomial confidence limits (options include exact, arcsin, normal, or anscombe). Terry Therneau [19/SEP/1997]

cipoisson

  

Computes exact Poisson confidence limits (options include exact or anscombe). Terry Therneau [19/SEP/1997]

fastlo

  

Normalizes either a matrix of values or perfect match and mismatch data from a microarray 'Plob' object. Karla Ballman, Terry Therneau, & Diane Grill [27/JUN/2003]

gamterms

  

Returns the individual terms of a `gam' object, along with the standard errors, in a way that is useful for plotting. Dirk Larson & Terry Therneau [23/AUG/2006]

jitplot

  

Jitters y-values systematically and plots them against x-values (categorical). Beth Atkinson & Terry Therneau [20/NOV/2003]

mlowess

  

The same as lowess except that it allows for missing values. Terry Therneau [23/MAR/2001]

multci

  

Computes simulaneous confidence intervals for multinomial distributions. Ross Dierkhising [28/JUL/2003]

multpower

  

Computes power and sample size of chi-squared test for multinomial distributions. Ross Dierkhising [27/JUL/2001]

plotby

  

Plots x vs. y by z using different colors/symbols for each unique z value, with the option of a lowess or linear line for each group. Beth Atkinson [4/NOV/2003]

plotterm

  

Uses the output of gamterms and produces a plot of the selected term. Terry Therneau [23/MAR/2000]

umbrella

  

Calculates the Peter O'Brien umbrella test for comparing samples with multiple endpoints. Beth Atkinson, Susan Kunselman & Paul Novotny [1/JUN/1999]

waldtest

  

Calculates the Wald test for a contrast matrix C for coefficients from a Cox model. Terry Therneau [23/MAR/2001]