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.

Value

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

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

See also

Examples

Dim(corAR1(), getGroups(Orthodont))
#> $N
#> [1] 108
#> 
#> $M
#> [1] 27
#> 
#> $maxLen
#> [1] 4
#> 
#> $sumLenSq
#> [1] 432
#> 
#> $len
#> groups
#> M01 M02 M03 M04 M05 M06 M07 M08 M09 M10 M11 M12 M13 M14 M15 M16 F01 F02 F03 F04 
#>   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4 
#> F05 F06 F07 F08 F09 F10 F11 
#>   4   4   4   4   4   4   4 
#> 
#> $start
#>  [1]   0   4   8  12  16  20  24  28  32  36  40  44  48  52  56  60  64  68  72
#> [20]  76  80  84  88  92  96 100 104
#>