getCovariate.corStruct.Rd
This method function extracts the covariate(s) associated with
object
.
# S3 method for class 'corStruct'
getCovariate(object, form, data)
an object inheriting from class corStruct
representing a correlation structure.
this argument is included to make the method function
compatible with the generic. It will be assigned the value of
formula(object)
and should not be modified.
an optional data frame in which to evaluate the variables
defined in form
, in case object
is not initialized and
the covariate needs to be evaluated.
when the correlation structure does not include a grouping factor, the
returned value will be a vector or a matrix with the covariate(s)
associated with object
. If a grouping factor is present, the
returned value will be a list of vectors or matrices with the
covariate(s) corresponding to each grouping level.
For spatial correlation structures, this extracts the distances
implied by the covariates, and excludes 1-observation groups.
Pinheiro, J.C., and Bates, D.M. (2000) "Mixed-Effects Models in S and S-PLUS", Springer.
cs1 <- corAR1(form = ~ 1 | Subject)
getCovariate(cs1, data = Orthodont)
#> $M01
#> [1] 1 2 3 4
#>
#> $M02
#> [1] 1 2 3 4
#>
#> $M03
#> [1] 1 2 3 4
#>
#> $M04
#> [1] 1 2 3 4
#>
#> $M05
#> [1] 1 2 3 4
#>
#> $M06
#> [1] 1 2 3 4
#>
#> $M07
#> [1] 1 2 3 4
#>
#> $M08
#> [1] 1 2 3 4
#>
#> $M09
#> [1] 1 2 3 4
#>
#> $M10
#> [1] 1 2 3 4
#>
#> $M11
#> [1] 1 2 3 4
#>
#> $M12
#> [1] 1 2 3 4
#>
#> $M13
#> [1] 1 2 3 4
#>
#> $M14
#> [1] 1 2 3 4
#>
#> $M15
#> [1] 1 2 3 4
#>
#> $M16
#> [1] 1 2 3 4
#>
#> $F01
#> [1] 1 2 3 4
#>
#> $F02
#> [1] 1 2 3 4
#>
#> $F03
#> [1] 1 2 3 4
#>
#> $F04
#> [1] 1 2 3 4
#>
#> $F05
#> [1] 1 2 3 4
#>
#> $F06
#> [1] 1 2 3 4
#>
#> $F07
#> [1] 1 2 3 4
#>
#> $F08
#> [1] 1 2 3 4
#>
#> $F09
#> [1] 1 2 3 4
#>
#> $F10
#> [1] 1 2 3 4
#>
#> $F11
#> [1] 1 2 3 4
#>