santaR_pvalue_dist_within {santaR} | R Documentation |
Evaluate difference between a group mean curve and a constant model
Description
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
.
Usage
santaR_pvalue_dist_within(SANTAGroup, nPerm = 1000, nStep = 5000)
Arguments
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. |
Value
A p-value
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)
# ~0.00990099
[Package santaR version 1.2.4 Index]