Returns a tibble with the following columns:

  • grouptype of varFunc, along with the right hand side of the formula in parentheses e.g. "varExp(age | Sex)".

  • termterms included in the formula of the variance model, specifically the names of the coefficients. If the value is fixed, it will be appended with " ; fixed".

  • estimateestimated coefficient

  • estimatedThis column is only included if some parameters are fixed. TRUE if the parameter is estimated and FALSE if the parameter is fixed.

# S3 method for varFunc
tidy(x, ...)

# S3 method for varComb
tidy(x, ...)

Arguments

x

An object of class varFunc, such as those used as the weights argument from the nlme package

...

Ignored

Value

If the varFunc is uninitialized or has no parameters, the function will return an empty tibble. Otherwise, it will return a tibble with names described in the details section.

Examples

if (FALSE) {
if (require("nlme")) {
ChickWeight_arbitrary_group <- datasets::ChickWeight
ChickWeight_arbitrary_group$group_arb_n <-
  1 + (
    as.integer(ChickWeight_arbitrary_group$Chick) >
    median(as.integer(ChickWeight_arbitrary_group$Chick))
  )
ChickWeight_arbitrary_group$group_arb <- c("low", "high")[ChickWeight_arbitrary_group$group_arb_n]

fit_with_fixed <-
  lme(
    weight ~ Diet * Time,
    random = ~Time | Chick,
    data =ChickWeight_arbitrary_group,
    weights=varIdent(fixed=c("low"=5), form=~1|group_arb)
  )
# Show all parameters
tidy(fit_with_fixed)
# Exclude fixed parameters
tidy(fit_with_fixed) %>%
  filter(across(any_of("estimated"), ~.x))
}
}