Learn R Programming

confreq (version 1.6.1-1)

chi_local_test_cfa: Local Chi-Square Test

Description

Calculates the local chi-square test based on obseved and expected frequencies.

Usage

chi_local_test_cfa(observed, expected)

Value

a list with chi-square statistic and corresponding degrees of freedom an p-value.

Arguments

observed

a vector giving the observed frequencies.

expected

a vector giving the expected frequencies.

Details

No details in the moment.

References

No references in the moment

Examples

Run this code
#######################################
# first calculate expected counts for LienertLSD data example.
designmatrix<-design_cfg_cfa(kat=c(2,2,2)) # generate an designmatrix (only main effects)
data(LienertLSD) # load example data
observed<-LienertLSD[,4] # extract observed counts
expected<-expected_cfa(des=designmatrix, observed=observed) # calculation of expected counts
 chi_local_test_cfa(observed,expected)
####################################### 

Run the code above in your browser using DataLab