Learn R Programming

CGManalyzer (version 1.3.1)

pairwiseComparison.fn: function to calculate mean difference and its confidence interval, SSMD, p-value of t.test for pairwise comparison

Description

function to calculate mean difference and its confidence interval, SSMD, p-value of t.test for pairwise comparison

Usage

pairwiseComparison.fn(y, INDEX, na.rm = TRUE, conf.level = 0.95)

Value

a vector for calculated mean difference, its upper and lower bounds of CI, SSMD and pvalue in each pairs of group comparison, along with mean, standard deviation, and sample size in each group

Arguments

y

response value

INDEX

vector for group names

na.rm

whether to remove value for calculation

conf.level

confidence level for two-sided t-test

Author

Xiaohua Douglas Zhang

Details

function to calculate mean difference and its confidence interval, SSMD, p-value of t.test for pairwise comparison

References

Zhang XD, Zhang Z, Wang D. 2018. CGManalyzer: an R package for analyzing continuous glucose monitoring studies. Bioinformatics 34(9): 1609-1611 (DOI: 10.1093/bioinformatics/btx826).

Examples

Run this code
library(CGManalyzer)
package.name <- "CGManalyzer"
source( system.file("SPEC", "SPECexample.R", package = package.name) )
MSE.mat <- read.csv(file=system.file("SPEC", "MSE.csv", package = package.name), row.names=1)
pairwiseComparison.fn(y=MSE.mat[, 1], INDEX=subjectTypes, na.rm=TRUE)

Run the code above in your browser using DataLab