Learn R Programming

brokenstick (version 2.6.0)

get_omega: Extract Variance and Correlation Components

Description

Extracts variance-covariance or correlation matrix from a brokenstick object.

Usage

get_omega(
  x,
  hide = c("right", "left", "boundary", "internal", "none"),
  cor = FALSE,
  whatknots = "all",
  what = "cov"
)

Value

A numeric matrix, possibly with zero rows and columns if no names match

Arguments

x

Object of class brokenstick

hide

Should output for knots be hidden in get, print, summary and plot functions? Can be "left", "right", "boundary", "internal" or "none". The default is "right".

cor

Logical. Should the function return the correlation matrix instead of the covariance matrix? The default is FALSE.

whatknots

Deprecated.

what

Deprecated.

Examples

Run this code
f1 <- brokenstick(hgt_z ~ age | id, smocc_200[1:1000, ], knots = 0:2, seed = 1)
get_omega(f1, cor = TRUE, hide = "boundary")

Run the code above in your browser using DataLab