mxRestore {OpenMx}R Documentation

Restore From Checkpoint File


The function loads the last saved state from a checkpoint file.


mxRestore(model, = ".", chkpt.prefix = "")


model MxModel object to be loaded. character. Directory where the checkpoint file is located.
chkpt.prefix character. Prefix of the checkpoint file.


In general, the arguments ‘’ and ‘chkpt.prefix’ should be identical to the mxOption: ‘Checkpoint Directory’ and ‘Checkpoint Prefix’ that were specificed on the model before execution.

Alternatively, the checkpoint file can be manually loaded as a data.frame in R. Use read.table with the options ‘header=TRUE’, ‘stringsAsFactors=FALSE’ and ‘check.names=FALSE’.


Returns an MxModel object with free parameters updated to the last saved values.


The OpenMx User's guide can be found at


#Create a model that includes data, 
#matrices A, S and F, and an objective function
## Not run: 
data <- mxData(mydata, type="cov", numObs = 100)
objective <- mxRAMObjective('A', 'S', 'F')
model <- mxModel("mymodel", A, S, F, data, objective)

#Use mxRun to optimize the free parameters in the matrices A and S
modelOut <- mxRun(model, checkpoint = TRUE)

#Use mxRestore to load the last saved state of the model
modelRestore <- mxRestore(model)
## End(Not run)

[Package OpenMx version 1.0.0-1448 Index]