umx (version 1.9.1)

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)

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)

Value

- mxModel if provided

References

- http://tbates.github.io, https://github.com/tbates/umx, http://openmx.ssri.psu.edu

See Also

Other Get and set: umx_get_checkpoint, umx_set_auto_plot, umx_set_auto_run, umx_set_condensed_slots, umx_set_cores, umx_set_optimizer, umx_set_plot_file_suffix, umx_set_plot_format, umx_set_table_format

Examples

Run this code
# NOT RUN {
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)
latents  = c("G")
manifests = names(demoOneFactor)
m1 <- umxRAM("One Factor", data = mxData(cov(demoOneFactor), type = "cov", numObs = 500),
	umxPath(latents, to = manifests),
	umxPath(var = manifests),
	umxPath(var = latents, fixedAt = 1.0)
)
m1 = umx_set_checkpoint(model = m1)
m1 = mxRun(m1)
umx_checkpoint(0)
# }

Run the code above in your browser using DataLab