compare_two: Wilcoxon Sign-Rank Test

View source: R/Wilcoxon_Sign_Rank_Test.R

compare_twoR Documentation

Wilcoxon Sign-Rank Test

Description

Tests for the difference between two related variables; takes into account the magnitude and direction of difference

Usage

wilcox_sign(physeq, sampleid, PID, GROUP, grp1, grp2)

Arguments

physeq

(Required). A phyloseq object containing merged information of abundance, sample data including the measured variables and categorical information of the samples.

PID

id (Required) for paired test

GROUP

names (Required) of group information, only contain two levels if grp1 or grp2 haven't been provided

grp1

one of groups to be converted into 0 (optional)

grp2

one of groups to be converted into 1 (optional)

sampleid

(Required) A character of the sampleid to connect phenotype and profiles.

Details

01/10/2020 ShenZhen China

Value

Returns a result of Wilcoxon Sign-Rank Test

type: kind of data

Block: group information

Num: number of group

P-value: P by Wilcoxon Sign-Rank Test

FDR: adjusted by BH

Enrichment: directory by median or directory by rank

Occurence: occurence of two groups

median: both or each group

rank: each group

FDR: adjusted P value by BH

Odds Ratio: 95

Author(s)

Hua Zou/ Huahui Ren

Examples


data(physeq_data)
sampleid <- "SampleID"
pid <- "ID"
group <- "Stage"
grp1 <- "Before"
grp2 <- "After"

result <- wilcox_sign(physeq_data, sampleid, pid, group, grp1, grp2)



rusher321/microbiotaPair documentation built on July 24, 2024, 8:40 p.m.