Type of Tool  RFunction 
Title  Variance Smoothing of Fully Moderated tstatistic 
Programmer/Email  Lianbo Yu 
Contributing Site  other 
Description 
This function computes posterior residual variances to be used in the denominator of a moderated tstatistic from a linear model analysis of microarray data. It is an extension of the moderated tstatistic original proposed by Smyth (2004). LOESS local regression and empirical Bayesian method are used to estimate gene specific prior degrees of freedom and prior variance based on average gene intensity level. The posterior residual variance in the denominator is a weighted average of prior and residual variance and the weights are prior degrees of freedom and residual variance degrees of freedom. The degrees of freedom of the moderated tstatistic is simply the sum of prior and residual variance degrees of freedom. 
Example  Example code 
Classification Graph Type 

Graph_Type 

References  Yu L, Gulati P, Fernandez S, Pennell M, Kirschner L, Jarjoura D. Fully moderated tstatistic for small sample size gene expression arrays. Statistical Applications in Genetics and Molecular Biology, 2011; 10:article 42. 
Datasets 

Data 

Software Program  R 
Software 

Macro Parameters 
Amean: vector of residual variances of all genes. df: degrees of freedom for sigmasq. span1: span parameter in LOESS smoothing function. span2: span parameter in LOESS smoothing function. iter1: iteration number in LOESS smoothing function. iter2: iteration number in LOESS smoothing function. b: number of genes on either side of moving average window when calculating variance of log residual variances. 
RCode  Attachment  https://www.ctspedia.org/wiki/pub/CTSpedia/StatToolsTopic065/fmt.R 
RCode 

SASCode  Attachment 

SASCode 

StataCode  Attachment 

StataCode 

Other Code  Attachment 

Other Code 

Called Data Manipulation 

Called Tool/Utility 

Called Checking Macro 

Called Other 

CreationDate  March, 2012 
RevisionDate 

Example Code 

Example Output 

SAS Examples 

SAS_Example_Code 

SAS_Example_Output 

R Examples 

R_Example_Code 

R_Example_Output 

Stats Examples 

Special Features 

Special Features Attached 

Special Features Text 

Notes1Legend  Section with calls to needed macros 
Notes1 

Notes2Legend  Macro call with fully specified parameters 
Notes2 

Notes3Legend  Section with definitions of global macro parameters 
Notes3 

Notes4Legend  Section with definitions of local macro variables 
Notes4 

See Also 

Checklists 

Stat Tools Disclaimer  This tool is also available in R package fmt. 
Discliamer 
The views expressed within CTSpedia are those of the author and must not be taken to represent policy or guidance on the behalf of any organization or institution with which the author is affiliated. 
Permission 
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT OLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
Reference Image 
