60 likes | 175 Vues
This guide explores various output saving options for statistical modeling, focusing on the strengths and weaknesses of each method. We discuss using the sink() function for capturing script outputs, its integration at the script's start and end, and the flexibility in formatting. Additionally, we cover confidence intervals available for estimated parameters, specifically how to utilize the mxCI function effectively. For long-running models, checkpointing is highlighted as a strategy to save interim results, aiding in recovery after a crash and maximizing workflow efficiency.
E N D
Bits and peices Sarah Medland
Options for saving output • Save the workspace • Pros • Saves everything • You can make changes to the model • Cons • Saves everything • Not secure…
Options for saving output • Using sink() • At the beginning of the script • sink (“filename", split=TRUE) • At the end of the script • sink ()
Confidence intervals • Available for estimated parameters & algebra • mxCI(c(‘matrix',‘item')) • Include this in the model • Can get only upper or lower if you want • Can chose the interval – default is 95% • Include Intervals=TRUE on the run line • Remember that these are ML CIs
Checkpointing • Good for long running models • Write out the results every n iterations/minutes • If your model crashes use the check pointed values for start values