Page 1 of 1

graphs.txt problems

Posted: Fri Sep 27, 2013 2:35 pm
by davidmcm
I'm trying to graph power curves after creating macros from MLPowSim. These are for power calculations for a two-level logistic regression model.

After inputting the relevant parameters into MLPowSim I have tried to open the resultant graphs.txt macro in MLwiN, as per the instruction manual. However, when I do this I get the following error message:

Run-time error ‘9’:
Subscript out of range

The macro code I'm trying to run is:

NOTE MLwiN macro code generated by MLPowSim
NOTE can be run after finishing execution to give graphs
GIND 1 1
GYCO c211
GXCO c210
GTYP 1
GCLR 1
CALC c251 = c211 - c251
GYER 1 c251
GYER 2 c251
GETY 1
GIND 1 2
GYCO c231
GXCO c210
GTYP 1
GCLR 9
CALC c291 = c231 - c291
CALC c311 = c311 - c231
GYER 1 c291
GYER 2 c311
GETY 1

Any guidance on where I may be going wrong would be appreciated.

David

Re: graphs.txt problems

Posted: Wed Oct 02, 2013 4:21 pm
by ChrisCharlton
I am able to replicate this by attempting to include an empty column in the plot. Could you confirm that all the columns referenced by the macro (c211, c210, c251, c231, c291) contain data? If they do then I will attempt to investigate this further if you can provide the other macros generated by MLPowSim.

Re: graphs.txt problems

Posted: Thu Oct 03, 2013 7:08 pm
by davidmcm
Chris, many thanks for your response, and offer of help, much appreciated. I managed to get the power table output via R (MLwiN didn't like the other macros either). Struggled to graph the curves in R also, not sure why it didn't like the code. Got the data into SPSS and then plotted the curves successfully. Got there in the end!

Re: graphs.txt problems

Posted: Mon Oct 07, 2013 8:50 am
by ChrisCharlton
I'm glad to hear that you have something working, however if it was possible to provide the scripts that didn't work for you then we could look into whether there is a more general problem.