Macro programming

Problem with with running models from macro files. This bug affects version 2.1 beta 6-11 and release versions 2.10 and 2.11

When running a model(s) from a macro file, due to a bug in these versions some of the data variables in the worksheet could be overwritten. If the overwritten variables are themselves in the model it is possible that the model could still converge but give wrong results. If you have run models from macro files we recommend you check that the data variables contain the correct values in the worksheet after the model(s) has been run. For example, suppose we have a macro file that contains the commands

Resp ‘y’
Expl 1 ‘cons’
Iden 1 ‘pupil’ 2 ‘school’
Batc 1
Maxi 5000
Star
Rand
Fixe
Like
Expl 1 ‘x1’
Next
Rand
Fixe
Like

… and so on for a series of models

Check the state of the worksheet after this sequence of models has run. If the data ranges for all variables that have been included in the set of models are correct then the problem has not occurred. If however the ranges for some variables are incorrect then the problem has occurred and the macro should be re-run using version 2.12, with the original data (i.e. a copy of the data on which the macros have never been run). Alternatively you can stay within v 2.10 or 2.11 if installing the upgrade to subsequent versions is difficult for any reason and type the command

MEMS 1

and then rerun your macro(s) on the original data. This will also resolve the problem.

Further information

The error can occur if the response is Normal (if there is just one response) or if all the responses are Normal (if fitting a multivariate response model), or if the older method of setting the distribution type to non-Normal has been used, i.e.

SET B10 [0,1 or 2]

Note if you have used the more recent command RDISt to set the response distribution away from Normal then the error will not occur.  If you have used the RDIst command to set all responses to Normal the problem can still occur.

We would like to apologise for inconvenience caused by this bug. We have a test-suite that we run on all versions before releasing them. These tests included all the models fitted in the User’s Guide, MCMC Manual and Manual Supplement for version 2.10, and the online training materials; unfortunately they did not test running models from macros. We have now upgraded our test suite to include this.

We are grateful to Peter Spreeuwenberg for alerting us to this problem.

Window redrawing problem

Some windows did not redraw correctly when the pause statement was issued in a user macro file.

version fixed (bugfix): 1.02.002

LINEarise command problem

The command

LINEarise mode N order M

N= 0 MQL

N=1 PQL

M=1 first order aproximation

M=2 second order approximation

would only accept values of 1 for M.

fixed 2.10

Edit this page