View source: R/santaR_pvalue_fit.R
santaR_pvalue_fit_within | R Documentation |
Execute a t-test based on the comparison of improvement of model fit from a single group mean curve to the fit of both a group mean curve and a constant linear model. This statistic identifies within-class differential evolution, and test whether the population average time curve is flat or not. n constant linear model are generated to match the n individual trajetories. The Null distribution is generated by permuting the n group individuals and the n constant trajectories. The real improvement in model fit for the real group membership versus flat trajectories is then compared to the Null distribution of model fit improvement, similarly to santaR_pvalue_fit
. Adapted from Storey and al. 'Significance analysis of time course microarray experiments', PNAS, 2005 [1].
santaR_pvalue_fit_within(SANTAGroup, nPerm = 1000)
SANTAGroup |
A fitted group extracted from a SANTAObj generated by |
nPerm |
(int) Number of permutations. Default 1000. |
A p-value
[1] Storey, J. D., Xiao, W., Leek, J. T., Tompkins, R. G. & Davis, R. W. Significance analysis of time course microarray experiments. Proceedings of the National Academy of Sciences of the United States of America 102, 12837-42 (2005).
Inter-group comparison with santaR_pvalue_fit
## 56 measurements, 8 subjects, 7 unique time-points ## Default parameter values decreased to ensure an execution < 2 seconds Yi <- acuteInflammation$data$var_3 ind <- acuteInflammation$meta$ind time <- acuteInflammation$meta$time group <- acuteInflammation$meta$group grouping <- get_grouping(ind, group) inputMatrix <- get_ind_time_matrix(Yi, ind, time) SANTAObj <- santaR_fit(inputMatrix, df=5, grouping=grouping, verbose=TRUE) SANTAGroup <- SANTAObj$groups[[1]] #SANTAGroup <- SANTAObj$groups$Group1 santaR_pvalue_fit_within(SANTAGroup, nPerm=500) # ~0.6726747
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.