This S3 method computes observed and expected frequencies for univariate and bivariate distributions.

IRT.frequencies(object, ...)

IRT_frequencies_default(data, post, probs, weights=NULL)

IRT_frequencies_wrapper(object, ...)

# S3 method for din
IRT.frequencies(object, ...)

# S3 method for gdina
IRT.frequencies(object, ...)

# S3 method for mcdina
IRT.frequencies(object, ...)

# S3 method for gdm
IRT.frequencies(object, ...)

# S3 method for slca
IRT.frequencies(object, ...)

Arguments

object

Object of classes din, gdina, mcdina, gdm or slca.

...

More arguments to be passed.

data

Item response data as extracted by IRT.data

post

Individual posterior distribution as extracted by IRT.posterior

probs

Individual posterior distribution as extracted by IRT.irfprob

weights

Optional vector of weights as included as the attribute weights in IRT.data

Value

List with following entries

uni_obs

Univariate observed distribution

uni_exp

Univariate expected distribution

M_obs

Univariate observed means

M_exp

Univariate expected means

SD_obs

Univariate observed standard deviations

SD_exp

Univariate expected standard deviations

biv_obs

Bivariate observed frequencies

biv_exp

Bivariate expected frequencies

biv_N

Bivariate sample size

cov_obs

Observed covariances

cov_cor

Expected covariances

cor_obs

Observed correlations

cor_exp

Expected correlations

chisq

Chi square statistic of local independence

Examples

if (FALSE) {
#############################################################################
# EXAMPLE 1: Usage IRT.frequencies
#############################################################################

data(sim.dina, package="CDM")
data(sim.qmatrix, package="CDM")

# estimate GDINA model
mod1 <- CDM::gdina( data=sim.dina,  q.matrix=sim.qmatrix)
summary(mod1)

# direct usage of IRT.frequencies
fres1 <- CDM::IRT.frequencies(mod1)

# use of the default function with input data
data <- CDM::IRT.data(object)
post <- CDM::IRT.posterior(object)
probs <- CDM::IRT.irfprob(object)
fres2 <- CDM::IRT_frequencies_default(data=data, post=post, probs=probs)
}