pivot_coord_rotate: Estimate pivot balance coordinates by rotating sequential...

pivot_coord_rotateR Documentation

Estimate pivot balance coordinates by rotating sequential binary partition.

Description

Estimate pivot balance coordinates by rotating sequential binary partition.

Usage

pivot_coord_rotate(object, summary = TRUE, ...)

Arguments

object

An object of class brmcoda.

summary

Should summary statistics be returned instead of the raw values? Default is TRUE.

...

currently ignored.

Value

A list of brmcoda for each pivot balance coordinate.

Examples


if(requireNamespace("cmdstanr")){
  cilr <- complr(data = mcompd, sbp = sbp,
                 parts = c("TST", "WAKE", "MVPA", "LPA", "SB"), idvar = "ID",
                 total = 1440)
  
  m <- brmcoda(complr = cilr,
                formula = Stress ~ bilr1 + bilr2 + bilr3 + bilr4 +
                                   wilr1 + wilr2 + wilr3 + wilr4 + (1 | ID),
                chain = 1, iter = 500,
                backend = "cmdstanr")
  
  m_pivot_coord_rotate <- pivot_coord_rotate(m)
  summary(m_pivot_coord_rotate)
  
  m_pivot_coord_raw <-  pivot_coord_rotate(m, summary = FALSE)
  brms::posterior_summary(m_pivot_coord_raw)
  }

florale/multilevelcoda documentation built on Oct. 19, 2024, 5:49 p.m.