Learn R Programming

bingat (version 1.2.2)

lrtPvalue: Likelihood Ratio Test

Description

This function returns the p-value of the significance between two groups.

Usage

lrtPvalue(data, type, groups, numPerms = 10, parallel = FALSE, cores = 3)

Arguments

data

A data frame in which the columns contain a 0/1 value for each node in the rows.

type

The type of graph being used (adjmatrix or adjmatrixlt).

groups

A vector of 0/1s used to denote the group membership of columns in the data.

numPerms

The number of permutations (ideally, 1000 or more).

parallel

TRUE or FALSE depending on whether the analysis will be parallelized for speed.

cores

The number of cores to use for parallelization. Ignored if parallel = FALSE.

Value

The p-value for the difference between the two groups being tested.

Examples

Run this code
	data(braingraphs)
	
	grps <- sample(0:1, ncol(braingraphs), TRUE)
	numPermutations <- 1 ### This is set low for speed
	
	lrt <- lrtPvalue(braingraphs, "adjMatrix", grps, numPermutations) 
	lrt	

Run the code above in your browser using DataLab