View source: R/santaR_pvalue_dist.R
santaR_pvalue_dist_within | R Documentation |
Execute a t-test based on the comparison of distance between a group mean curve and a constant linear model. Generate n constant linear model. The Null distribution is generated by permuting the n group individuals and the n constant trajectories. The real distance (area) between the group trajectory and the flat trajectory is compared to the Null distribution of distances, similarly to santaR_pvalue_dist
.
santaR_pvalue_dist_within(SANTAGroup, nPerm = 1000, nStep = 5000)
SANTAGroup |
A fitted group extracted from a SANTAObj generated by |
nPerm |
(int) Number of permutations. Default 1000. |
nStep |
(int) Number of steps employed for the calculation of the area between group mean curves. Default is 5000. |
A p-value
Inter-group comparison with santaR_pvalue_dist
## 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[[2]] #SANTAGroup <- SANTAObj$groups$Group2 santaR_pvalue_dist_within(SANTAGroup, nPerm=500) # ~0.00990099
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.