Learn R Programming

jackstraw (version 1.1)

dev.R: Compute Deviance for Logistic Factors

Description

This function computes deviance between the full model and the null (intercept-only) model. It uses built-in R functions, namely glm; slow but no C++ dependencies. Make sure that LFr1 and LFr0 do not have intercept terms.

Usage

dev.R(dat, LFr1, LFr0 = NULL, p = FALSE)

Arguments

dat

a matrix with m rows and n columns.

LFr1

alternative logistic factors (an output from lfa or lfa.corpcor)

LFr0

null logistic factors (an output from lfa or lfa.corpcor)

p

estimate p-values (by default, "FALSE")

Value

When p=FALSE (by default), dev.R returns a vector of m deviances.

When p=TRUE, a list consisting of

dev

the m deviances

p.value

the m p-values based on a chisq distribution