Wrapper to perform the permutation test on the t-statistic. This is the original method employed by metastats (for non-sparse large samples). We include CSS normalization though (optional) and log2 transform the data. In this method the null distribution is not assumed to be a t-dist.

1 2 | ```
fitLogNormal(obj, mod, useCSSoffset = TRUE, B = 1000, coef = 2,
sl = 1000)
``` |

`obj` |
A MRexperiment object with count data. |

`mod` |
The model for the count distribution. |

`useCSSoffset` |
Boolean, whether to include the default scaling parameters in the model or not. |

`B` |
Number of permutations. |

`coef` |
The coefficient of interest. |

`sl` |
The value to scale by (default=1000). |

Call made, fit object from lmFit, t-statistics and p-values for each feature.

1 2 3 4 5 6 7 8 9 10 | ```
# This is a simple demonstration
data(lungData)
k = grep("Extraction.Control",pData(lungData)$SampleType)
lungTrim = lungData[,-k]
k = which(rowSums(MRcounts(lungTrim)>0)<30)
lungTrim = cumNorm(lungTrim)
lungTrim = lungTrim[-k,]
smokingStatus = pData(lungTrim)$SmokingStatus
mod = model.matrix(~smokingStatus)
fit = fitLogNormal(obj = lungTrim,mod=mod,B=1)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.