Evaluate difference between a group mean curve and a constant model
Source:R/santaR_pvalue_dist.R
santaR_pvalue_dist_within.Rd
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
.
Arguments
- SANTAGroup
A fitted group extracted from a SANTAObj generated by
santaR_fit
.- 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.
See also
Inter-group comparison with santaR_pvalue_dist
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[[2]]
#SANTAGroup <- SANTAObj$groups$Group2
santaR_pvalue_dist_within(SANTAGroup, nPerm=500)
#> [1] 0.007984032
# ~0.00990099