Scripts - Miscellaneous commands
System variables commands
Clear covariates
Use the Clear covariates command to clear the system variables $covariates[1] to $covariates[24].
Mathematical commands
BoxCoxParams
BoxCoxParams(var[,filter],lambda,shift) estimates an optimal value for Lambda and shift paramater for a Box-Cox or power transformation of a spreadsheet variable var and optionally a filter. See Power transformation. The estimated parameters are assigned to the corresponding workspace variables lambda and shift.
Randomize
Randomize(seed) resets the MedCalc random number generator.
Two different initializations with the same seed will generate the same sequence of random numbers.
If seed is 0, the generator is reinitialized to its initial value and the random number generator produces the same sequence of random numbers.
Other commands
CloseMainWindow
CloseMainWindow closes the MedCalc main window.
CloseScriptWindow
CloseScriptWindow closes the script window.
Delay
Delay(msec) delays execution of the script during msec milliseconds, with a ± 10 to 16 milliseconds accuracy.
Exec
Exec(command) executes the given command, as if it was given on the Windows command line (sometimes still referred to as DOS command line). The output is displayed in the output frame.
For example, Exec("chdir"); shows the current file directory.