This function performs a single iteration of the \(\beta\) method for one item's validation. It is designed to be used in parallel computing environments to speed up the validation process of the \(\beta\) method. The function is a utility function for validation. When the user calls the validation function with method = "beta", parallel_iter runs automatically, so there is no need for the user to call parallel_iter. It may seem that parallel_iter, as an internal function, could better serve users. However, we found that the Qval package must export it to resolve variable environment conflicts in R and enable parallel computation. Perhaps a better solution will be found in the future.

parallel_iter(
  i,
  Y,
  criter.index,
  P.alpha.Xi,
  P.alpha,
  pattern,
  ri,
  Ni,
  Q.pattern.ini,
  model,
  criter,
  search.method,
  P_GDINA,
  Q.beta,
  L,
  K,
  alpha.P,
  get.MLRlasso
)

Arguments

i

An integer indicating the item number that needs to be validated.

Y

A matrix of observed data used for validation.

criter.index

An integer representing the index of the criterion.

P.alpha.Xi

A matrix representing individual posterior probability.

P.alpha

A vector of attribute prior weights.

pattern

A matrix representing the attribute mastery patterns.

ri

A vector containing the number of examinees in each knowledge state who correctly answered item \(i\).

Ni

A vector containing the total number of examinees in each knowledge state.

Q.pattern.ini

An integer representing the initial pattern order for the model.

model

A model object used for fitting, such as the GDINA model.

criter

A character string specifying the fit criterion. Possible values are "AIC", "BIC", "CAIC", or "SABIC".

search.method

A character string specifying the search method for model selection. Options include "beta", "ESA", "SSA", or "PAA".

P_GDINA

A function that calculates probabilities for the GDINA model.

Q.beta

A Q-matrix used for validation.

L

An integer representing the number of all attribute mastery patterns.

K

An integer representing the number of attributes.

alpha.P

A matrix of individuals' marginal mastery probabilities (Tu et al., 2022).

get.MLRlasso

A function for Lasso regression with multiple linear regression.

Value

A list containing the following components:

fit.index.pre

The previous fit index value after applying the selected search method.

fit.index.cur

The current fit index value after applying the selected search method.

Q.pattern.cur

The pattern that corresponds to the optimal model configuration for the current iteration.

priority

The priority vector used in the PAA method, if applicable.