This function is used to classify examinees into labeled classes given responses and the Q-matrix.

1 2 3 4 |

`Y` |
A required |

`Q` |
A required |

`cluster.method` |
The cluster algorithm used to classify data. Two options are available, including |

`Kmeans.centers` |
The number of clusters when |

`Kmeans.itermax` |
The maximum number of iterations allowed when |

`Kmeans.nstart` |
The number of random sets to be chosen when |

`HACA.link` |
The link to be used with HACA. It must be one of |

`HACA.cut` |
The number of clusters when |

`label.method` |
The algorithm used for labeling. It should be one of "1","2a", "2b" and "3" corresponding to different labeling methods in Chiu and Ma (2013). The default is "2b". See |

`perm` |
The data matrix of the partial orders of the attribute patterns. |

`att.pattern` |
A |

`att.dist` |
A |

`cluster.size` |
A set of integers, indicating the sizes of latent clusters. |

`cluster.class` |
A vector of estimated memberships for examinees. |

`print.npar.CDM`

, `cd.cluster`

,`labeling`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ```
# Classification based on the simulated data and Q matrix
data(sim.dat)
data(sim.Q)
# Information about the dataset
N <- nrow(sim.dat) #number of examinees
J <- nrow(sim.Q) #number of items
K <- ncol(sim.Q) #number of attributes
# Compare the difference in results among different labeling methods
# Note that the default cluster method is HACA
labeled.obj.2a <- npar.CDM(sim.dat, sim.Q, label.method="2a")
labeled.obj.2b <- npar.CDM(sim.dat, sim.Q, label.method="2b")
labeled.obj.3 <- npar.CDM(sim.dat, sim.Q, label.method="3")
data(perm3)
labeled.obj.1 <- npar.CDM(sim.dat, sim.Q, label.method="1",perm=perm3)
remove(perm3)
#User-specified number of latent clusters
M <- 5
labeled.obj.2b <- npar.CDM(sim.dat, sim.Q, cluster.method="HACA",
HACA.cut=M, label.method="2b")
labeled.obj.2a <- npar.CDM(sim.dat, sim.Q, cluster.method="HACA",
HACA.cut=M, label.method="2a")
#The attribute pattern for each examinee
attpatt <- labeled.obj.2b$att.pattern
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.