R/eta.R

eta <-
function (K,J,Q)
{
  M <- 2^K
  A <- alpha(K)
  tmp <- matrix(NA,M,J)
  for (g in 1:M){ #g is latent pattern
    for (j in 1:J){ #j is item
      tmp[g,j] <- ifelse(all(as.logical(A[g,]^Q[j,])),1,0)
    }
  }
  return(tmp)
}

Try the ACTCD package in your browser

Any scripts or data that you put into this service are public.

ACTCD documentation built on Nov. 10, 2023, 1:12 a.m.