santaR_pvalue_fit_within: Evaluate difference between a group mean curve and a constant...

View source: R/santaR_pvalue_fit.R

santaR_pvalue_fit_withinR Documentation

Evaluate difference between a group mean curve and a constant model using the comparison of model fit (F-test)

Description

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].

Usage

santaR_pvalue_fit_within(SANTAGroup, nPerm = 1000)

Arguments

SANTAGroup

A fitted group extracted from a SANTAObj generated by santaR_fit.

nPerm

(int) Number of permutations. Default 1000.

Value

A 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

Inter-group comparison with santaR_pvalue_fit

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)
SANTAGroup  <- SANTAObj$groups[[1]]
#SANTAGroup <- SANTAObj$groups$Group1
santaR_pvalue_fit_within(SANTAGroup, nPerm=500)
# ~0.6726747


santaR documentation built on May 24, 2022, 1:06 a.m.