graphs.txt problems

Welcome to the forum for MLwiN users. Feel free to post your question about MLwiN software here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Remember to check out our extensive software FAQs which may answer your question: http://www.bristol.ac.uk/cmm/software/s ... port-faqs/
Post Reply
davidmcm
Posts: 2
Joined: Fri Sep 27, 2013 2:08 pm

graphs.txt problems

Post 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
ChrisCharlton
Posts: 1384
Joined: Mon Oct 19, 2009 10:34 am

Re: graphs.txt problems

Post 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.
davidmcm
Posts: 2
Joined: Fri Sep 27, 2013 2:08 pm

Re: graphs.txt problems

Post 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!
ChrisCharlton
Posts: 1384
Joined: Mon Oct 19, 2009 10:34 am

Re: graphs.txt problems

Post 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.
Post Reply