clusterchisq: Chisquare tests of a qualitative variable by several...

chisq.caracR Documentation

Chisquare tests of a qualitative variable by several qualitative variables

Description

Chisqure tests are performed for the contingency tables crossing a qualitative variable named cl and the qualitative variables present in columns from df

Usage

chisq.carac(df,cl,thr=2,decr=TRUE)

Arguments

df

data.frame, with factors contain the categories of the qualitave variables

cl

factor indicating the category of each subject

thr

threshold of test value, if decr=TRUE, only the rows where tval >= thr are returned

decr

if decr=TRUE the rows are returned in decreasing order

Value

Matrix with the following columns:

chi2

chisquare statistic

dfr

degree of fredom of chisquare densidity

pval

$p$ value

tval

quantil qnorm(pval,lower.tail=FALSE

phi2

phi2=chi2/n

Author(s)

Campo Elias Pardo cepardot@unal.edu.co

Examples

data(DogBreeds)
round(chisq.carac(DogBreeds[,-7],DogBreeds[,7]),3)
round(chisq.carac(DogBreeds[,-7],DogBreeds[,7],decr=FALSE),3)

FactoClass documentation built on Sept. 14, 2023, 1:07 a.m.