View source: R/santaR_pvalue_dist.R
santaR_pvalue_dist | R Documentation |
Evaluate the difference in group trajectories by executing a t-test based on the comparison of distance between group mean curves. Individual group membership is repeatedly randomly permuted to generate new random groups and group mean curves, then employed to compute a Null distribution of distance between goup mean curves. The distance between two group mean curves is defined as the area between both curves. The distance between the real group mean curves is then compared to this Null distribution and a p-value is computed.
The Pearson correlation coefficient between the two group mean curves is calculated to detect highly correlated group shapes if required.
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.
santaR_pvalue_dist(SANTAObj, nPerm = 1000, nStep = 5000, alpha = 0.05)
SANTAObj |
A fitted SANTAObj as 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. |
alpha |
(float) Confidence Interval on the permuted p-value (0.05 for 95% Confidence Interval). Default 0.05. |
A SANTAObj with added p-value dist and confidence interval on the p-value.
Comparison with constant model with santaR_pvalue_dist_within
Other Analysis:
get_grouping()
,
get_ind_time_matrix()
,
santaR_CBand()
,
santaR_auto_fit()
,
santaR_auto_summary()
,
santaR_fit()
,
santaR_plot()
,
santaR_pvalue_fit()
,
santaR_start_GUI()
## 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_dist(SANTAObj, nPerm=100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.