How to run a multilevel model using fractional polynomial

Welcome to the forum for runmlwin users. Feel free to post your question about runmlwin 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!

Go to runmlwin: Running MLwiN from within Stata >> http://www.bristol.ac.uk/cmm/software/runmlwin/
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: How to run a multilevel model using fractional polynomia

Post by ChrisCharlton »

Sorry - I forgot to add the forcerecast option when I copied the syntax. Could you try the following?:

Code: Select all

webuse igg
gen cons = 1
gen id = _n
fp <age>: noisily runmlwin sqrtigg cons <age>, level1(id:cons) nopause nogroup forcerecast
likestatistic
Posts: 39
Joined: Fri Sep 12, 2014 4:11 pm

Re: How to run a multilevel model using fractional polynomia

Post by likestatistic »

- It works and I guess it doesn't matter if I get this message? :D

Warning: age_1 has been recast to float, this has reduced precision
age_2: 182 values changed
Warning: age_2 has been recast to float, this has reduced precision

- I have tried with my data and I got the same message + the following
WARNING: IGLS algorithm failed to converge. Increase the number of iterations. See the maxiterations () option.
.100%)

Shall I specify maxiterations (20) for example after fp <item>? Using this option after the random_part doesn't work

Many thanks
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: How to run a multilevel model using fractional polynomia

Post by ChrisCharlton »

You get the warning message because the new variables generated by the fp command are in higher precision than MLwiN can currently load (which the forcerecast option reduces for you), so you should be able to ignore them.

The default value for the maximum number of iterations is already 20, so specifying this won't have an effect. To set the option you need to specify it within the -runmlwin- command options, e.g.

Code: Select all

fp <age>: noisily runmlwin sqrtigg cons <age>, level1(id:cons) nopause nogroup forcerecast maxiterations(40)
likestatistic
Posts: 39
Joined: Fri Sep 12, 2014 4:11 pm

Re: How to run a multilevel model using fractional polynomia

Post by likestatistic »

Many thanks for your help,

With missing data the programme doesn't run, so I need to impute them before. I am now trying to figure-out how to deal with mi, fp and runwlin.
Maybe I should do it in two steps using mi impute or realcom.
Do you have some advice?

Thanks.
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: How to run a multilevel model using fractional polynomia

Post by GeorgeLeckie »

Hi Likestatistic,

I would have thought that you would run the 44 models separately on each of your M imputed datasets. The M runs should agree as to what the best model is (i.e., the model with the smallest deviance). Then combine the M sets of results for that preferred model using Rubin's rules and present that in your paper. So you only need to use mi estimate and runmlwin for the preferred model.

Best wishes

George
likestatistic
Posts: 39
Joined: Fri Sep 12, 2014 4:11 pm

Re: How to run a multilevel model using fractional polynomia

Post by likestatistic »

Thank you for your suggestion :D
I was trying to find an easiest way. But you are right I should to do it step by step with each imputed variable.

Many thanks to both for your help

Cheers

Likestatistic
Post Reply