Page 3 of 3
Re: How to run a multilevel model using fractional polynomia
Posted: Wed Sep 17, 2014 10:44 am
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
Re: How to run a multilevel model using fractional polynomia
Posted: Wed Sep 17, 2014 11:48 am
by likestatistic
- It works and I guess it doesn't matter if I get this message?
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
Re: How to run a multilevel model using fractional polynomia
Posted: Wed Sep 17, 2014 12:02 pm
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)
Re: How to run a multilevel model using fractional polynomia
Posted: Wed Sep 17, 2014 12:27 pm
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.
Re: How to run a multilevel model using fractional polynomia
Posted: Wed Sep 17, 2014 4:21 pm
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
Re: How to run a multilevel model using fractional polynomia
Posted: Wed Sep 17, 2014 5:12 pm
by likestatistic
Thank you for your suggestion
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