mysort function

Sort a multivariate data matrix according to patterns of missingness.

Sort a multivariate data matrix according to patterns of missingness.

mysort sorts a multivariate data matrix so that records with identical patterns of missingness are adjacent to one another. mysort is a private function used inside of mlest.

mysort(x)

Arguments

  • x: A multivariate data matrix. Rows correspond to individual records and columns correspond to components of the multivariate vector.

Returns

  • sorted.data: A matrix of the same size as x but with the rows re-arranged so that records with identical patterns of missingness are adjacent to one another.

  • freq: An integer vector giving the number of records in each block of rows with a unique pattern of missingness. The first element in freq counts the number of rows in the top block of sorted.data, and so on.

See Also

mlest

  • Maintainer: Mao Kobayashi
  • License: GPL (>= 2)
  • Last published: 2023-02-27