- # The same as in Initialize corStruct:
- form <- formula(object)
- ## Obtaining the group information, if any
- if(!is.null(getGroupsFormula(form))) {
- attr(object, "groups") <- getGroups(object, form, data = data)
- attr(object, "Dim") <- Dim(object, attr(object, "groups"))
- } else { # no groups
- attr(object, "Dim") <- Dim(object, as.factor(rep(1, nrow(data))))
- }
- ## Obtaining the covariate(s)
- attr(object, "covariate") <- getCovariate(object, data = data)
+ ## The same as in Initialize corStruct:
+ form <- formula(object)
+ ## Obtaining the group information, if any
+ if (!is.null(getGroupsFormula(form))) {
+ attr(object, "groups") <- getGroups(object, form, data = data)
+ attr(object, "Dim") <- Dim(object, attr(object, "groups"))
+ } else { # no groups
+ attr(object, "Dim") <- Dim(object, as.factor(rep(1, nrow(data))))
+ }
+ ## Obtaining the covariate(s)
+ attr(object, "covariate") <- getCovariate(object, data = data)