Learn R Programming

bingat (version 1.2.2)

glrtPvalue: GLRT Regression Results

Description

This function returns the p-value of the significance of b1 in the regression model.

Usage

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

Arguments

data

A data frame in which the columns (subjects) contain a 0/1 value for row (Node or Edge).

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

A list containing the results from glm.reg and GLRT.reg as well as the p-value.

Examples

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

Run the code above in your browser using DataLab