Learn R Programming

FactorCopula (version 0.9.3)

mle.StructuredFactor: Maximum likelihood estimation of the bi-factor and second-order copula models for item response data

Description

We approach the estimation of the bi-factor and second-order copula models for item response data with the IFM method of Joe (2005).

Usage

mleBifactor(y, copnames1, copnames2, gl, ngrp, grpsize,
hessian, print.level)
mleSecond_order(y, copnames1, copnames2, gl, ngrp, grpsize,
hessian, print.level)

Value

A list containing the following components:

cutpoints

The estimated univariate cutpoints.

taus

The estimated copula parameters in Kendall's tau scale.

SEs

The SEs of the Kendall's tau estimates.

loglik

The maximized joint log-likelihood.

Arguments

y

\(n \times d\) matrix with the item reponse data, where \(n\) and \(d\) is the number of observations and variables, respectively.

copnames1

For the bi-factor copula: \(d\)-vector with the names of bivariate copulas that link the each of the oberved variabels with the common factor. For the second-order factor copula: \(G\)-vector with the names of bivariate copulas that link the each of the group-specific factors with the common factor, where \(G\) is the number of groups of items. Choices are “bvn” for BVN, “bvt\(\nu\)” with \(\nu = \{1, \ldots, 9\}\) degrees of freedom for t-copula, “frk” for Frank, “gum” for Gumbel, “rgum” for reflected Gumbel, “1rgum” for 1-reflected Gumbel, “2rgum” for 2-reflected Gumbel.

copnames2

For the bi-factor copula: \(d\)-vector with the names of bivariate copulas that link the each of the oberved variabels with the group-specific factor. For the second-order factor copula: \(d\)-vector with the names of bivariate copulas that link the each of the oberved variabels with the group-specific factor. Choices are “bvn” for BVN, “bvt\(\nu\)” with \(\nu = \{1, \ldots, 9\}\) degrees of freedom for t-copula, “frk” for Frank, “gum” for Gumbel, “rgum” for reflected Gumbel, “1rgum” for 1-reflected Gumbel, “2rgum” for 2-reflected Gumbel.

gl

Gauss legendre quardrature nodes and weights.

ngrp

number of non-overlapping groups.

grpsize

vector indicating the size for each group, e.g., c(4,4,4) indicating four items in all three groups.

hessian

If TRUE, the hessian of the negative log-likelihood is calculated during the minimization process.

print.level

Determines the level of printing which is done during the minimization process; same as in nlm.

Author

Sayed H. Kadhem s.kadhem@uea.ac.uk
Aristidis K. Nikoloulopoulos a.nikoloulopoulos@uea.ac.uk

Details

Estimation is achieved by maximizing the joint log-likelihood over the copula parameters with the univariate cutpoints fixed as estimated at the first step of the proposed two-step estimation approach.

References

Joe, H. (2005) Asymptotic efficiency of the two-stage estimation method for copula-based models. Journal of Multivariate Analysis, 94, 401--419. tools:::Rd_expr_doi("10.1016/j.jmva.2004.06.003").

Kadhem, S.H. and Nikoloulopoulos, A.K. (2023) Bi-factor and second-order copula models for item response data. Psychometrika, 88, 132--157. tools:::Rd_expr_doi("doi:10.1007/s11336-022-09894-2").

Examples

Run this code
# \donttest{
#------------------------------------------------
# Setting quadreture points
nq <- 25
gl <- gauss.quad.prob(nq)
#------------------------------------------------
#                     TAS Data
#------------------             -----------------
data(TAS)
#using a subset of the data
#group1: 1,3,6,7,9,13,14
grp1=c(1,3,6)
#group2: 2,4,11,12,17
grp2=c(2,4,11)
#group3: 5,8,10,15,16,18,19,20
grp3=c(5,8,10)
#Rearrange items within testlets
set.seed(123)
i=sample(1:nrow(TAS),500)
ydat=TAS[i,c(grp1,grp2,grp3)]

d=ncol(ydat);d
n=nrow(ydat);n

#size of each group
g1=length(grp1)
g2=length(grp2)
g3=length(grp3)

grpsize=c(g1,g2,g3)#group size
#number of groups
ngrp=length(grpsize)

#BI-FACTOR
copX0 = rep("bvt2", d)
copXg = c(rep("rgum", g1), rep("bvt3", g2+g3))
mle_Bifactor =  mleBifactor(y = ydat, copX0, copXg, gl, ngrp, grpsize, hessian=FALSE, print.level=2)

# }

Run the code above in your browser using DataLab