Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

IRT.frequencies

S3 Method for Computing Observed and Expected Frequencies of Univariate and Bivariate Marginals


Description

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

Usage

IRT.frequencies(object, ...)

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

IRT_frequencies_wrapper(object, ...)

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

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

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

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

## S3 method for class '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

## Not run: 
#############################################################################
# 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)

## End(Not run)

CDM

Cognitive Diagnosis Modeling

v7.5-15
GPL (>= 2)
Authors
Alexander Robitzsch [aut, cre], Thomas Kiefer [aut], Ann Cathrice George [aut], Ali Uenlue [aut]
Initial release
2020-03-10 14:19:21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.