Learn R Programming

umx (version 4.20.0)

umx_set_checkpoint: umx_set_checkpoint

Description

Set the checkpoint status for a model or global options

Usage

umx_set_checkpoint(
  interval = 1,
  units = c("evaluations", "iterations", "minutes"),
  prefix = "",
  directory = getwd(),
  model = NULL
)

Value

  • mxModel if provided

Arguments

interval

How many units between checkpoints: Default = 1. A value of zero sets always to 'No' (i.e., do not checkpoint all models during optimization)

units

units to count in: Default unit is 'evaluations' ('minutes' is also legal)

prefix

string prefix to add to all checkpoint filenames (default = "")

directory

a directory, i.e "~/Desktop" (defaults to getwd())

model

(optional) model to set options in (default = NULL)

References

See Also

Other Get and set: umx_get_checkpoint(), umx_get_options(), umx_set_auto_plot(), umx_set_auto_run(), umx_set_condensed_slots(), umx_set_cores(), umx_set_data_variance_check(), umx_set_dollar_symbol(), umx_set_optimization_options(), umx_set_optimizer(), umx_set_plot_file_suffix(), umx_set_plot_format(), umx_set_plot_use_hrbrthemes(), umx_set_separator(), umx_set_silent(), umx_set_table_format(), umx

Examples

Run this code

if (FALSE) {
umx_set_checkpoint(interval = 1, "evaluations", dir = "~/Desktop/")
# Turn off checkpointing with interval = 0
umx_set_checkpoint(interval = 0)
umx_set_checkpoint(2, "evaluations", prefix="SNP_1")
require(umx)
data(demoOneFactor)
manifests = names(demoOneFactor)
m1 = umxRAM("One Factor", data = demoOneFactor, type = "cov",
	umxPath("G", to = manifests),
	umxPath(var = manifests),
	umxPath(var = "G", fixedAt = 1)
)
m1 = umx_set_checkpoint(model = m1)
m1 = mxRun(m1)
umx_checkpoint(0)
}

Run the code above in your browser using DataLab