santaR_pvalue_fit {santaR} | R Documentation |
Evaluate difference in group trajectories based on the comparison of model fit (F-test) between one and two groups
Description
Evaluate the difference in group trajectories by executing a t-test based on the comparison of improvement in model fit (F-test) between fitting one group mean curve to all individuals and fitting two group mean curves. This between-class differential evolution test, evaluates whether fitting 2 group curves decreases the residuals compared to a single group mean curve. The statistic employed is defined as a quantification of evidence for differential evolution, with the larger the statistic the more differentially evolving the variable appears to be. Individual group membership is repeatedly randomly permuted to generate new random groups and group mean curves, then employed to compute a Null distribution of the statistic (improvement in model fit from one to two groups). The improvement in model fit for the real group membership is then compared to this Null distribution (of no group difference) and a p-value is computed. Adapted from Storey and al. 'Significance analysis of time course microarray experiments', PNAS, 2005 [1].
The p-value is calculated as
(b+1)/(nPerm+1)
as to not report a p-value=0 (which would give problem with FDR correction) and reduce type I error.The p-value will vary depending on the random sampling. Therefore a confidence interval can be constructed using Wilson's interval which presents good properties for small number of trials and probabilities close to 0 or 1.
Usage
santaR_pvalue_fit(SANTAObj, nPerm = 1000, alpha = 0.05)
Arguments
SANTAObj |
A fitted SANTAObj as generated by |
nPerm |
(int) Number of permutations. Default 1000. |
alpha |
(float) Confidence Interval on the permuted p-value (0.05 for 95% Confidence Interval). Default 0.05. |
Value
A SANTAObj with added p-value fit and confidence interval on the p-value.
References
[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).
See Also
Comparison with constant model with santaR_pvalue_fit_within
Other Analysis:
get_grouping()
,
get_ind_time_matrix()
,
santaR_CBand()
,
santaR_auto_fit()
,
santaR_auto_summary()
,
santaR_fit()
,
santaR_plot()
,
santaR_pvalue_dist()
,
santaR_start_GUI()
Examples
## 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)
SANTAObj <- santaR_pvalue_fit(SANTAObj, nPerm=100)