Dim.corStruct function

Dimensions of a corStruct Object

Dimensions of a corStruct Object

if groups is missing, it returns the Dim attribute of object; otherwise, calculates the dimensions associated with the grouping factor.

## S3 method for class 'corStruct' Dim(object, groups, ...)

Arguments

  • object: an object inheriting from class "corStruct", representing a correlation structure.
  • groups: an optional factor defining the grouping of the observations; observations within a group are correlated and observations in different groups are uncorrelated.
  • ...: some methods for this generic require additional arguments. None are used in this method.

Returns

a list with components: - N: length of groups

  • M: number of groups

  • maxLen: maximum number of observations in a group

  • sumLenSq: sum of the squares of the number of observations per group

  • len: an integer vector with the number of observations per group

  • start: an integer vector with the starting position for the observations in each group, beginning from zero

Author(s)

José Pinheiro and Douglas Bates bates@stat.wisc.edu

See Also

Dim, Dim.corSpatial

Examples

Dim(corAR1(), getGroups(Orthodont))
  • Maintainer: R Core Team
  • License: GPL (>= 2)
  • Last published: 2025-03-31