tmx_show.MxModel: Show matrices of RAM models in a easy-to-learn-from format.

View source: R/tmx.R

tmx_show.MxModelR Documentation

Show matrices of RAM models in a easy-to-learn-from format.

Description

A great way to learn about models is to look at the matrix contents. tmx_show is designed to do this in a way that makes it easy to process for users: The matrix contents are formatted as tables, and can even be displayed as tables in a web browser.

Usage

## S3 method for class 'MxModel'
tmx_show(
  x,
  what = c("values", "free", "labels", "nonzero_or_free"),
  show = c("free", "fixed", "all"),
  matrices = c("S", "A", "M"),
  digits = 2,
  report = c("html", "markdown"),
  na.print = "",
  zero.print = ".",
  html_font = NULL,
  style = c("paper", "material_dark", "classic", "classic_2", "minimal", "material"),
  bootstrap_options = c("hover", "bordered", "condensed", "responsive"),
  lightable_options = "striped"
)

Arguments

x

an object e.g. umxRAM() umxMatrix() from which to show parameters.

what

legal options are "values" (default), "free", or "labels").

show

filter on what to show c("all", "free", "fixed").

matrices

to show (default is c("S", "A")). "thresholds" in beta.

digits

precision to report. Default = round to 2 decimal places.

report

How to report the results. "html" = open in browser.

na.print

How to display NAs (default = "")

zero.print

How to display 0 values (default = ".")

html_font

Default is null. Set (e.g. "Optima") to override the style's default font.

style

The style for the table (Defaults to "paper". Other options are "material_dark", "classic", "classic_2", "minimal", "material")

bootstrap_options

border etc. Defaults to c("hover", "bordered", "condensed", "responsive")

lightable_options

Default is "striped"

Details

The user can select which matrices to view, whether to show values, free, and/or labels, and the precision of rounding.

Value

None

References

See Also

Other Teaching and Testing functions: umxDiagnose(), umxPower()

Examples

## Not run: 
require(umx)
data(demoOneFactor)
manifests = names(demoOneFactor)
m1 = umxRAM("tmx_sh", data = demoOneFactor, type = "cov",
	umxPath("G", to = manifests),
	umxPath(var = manifests),
	umxPath(var = "G", fixedAt = 1)
)

# =============================================
# = Show smart table on the web (the default) =
# =============================================
tmx_show(m1, report = "html")
tmx_show(m1, what = "free", matrices = "thresholds")
tmx_show(m1, zero.print = "-")

tmx_show(m1, report = "markdown")
tmx_show(m1, digits = 3, report = "markdown")
tmx_show(m1, matrices = "S", report = "markdown")
tmx_show(m1, what = "free"  , report = "markdown")
tmx_show(m1, what = "labels", report = "markdown")
tmx_show(m1, what = "free", matrices = "A", report= "markdown")

## End(Not run)


tbates/umx documentation built on April 10, 2024, 8:14 p.m.