Suppress warning

Welcome to the forum for R2MLwiN users. Feel free to post your question about R2MLwiN 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 R2MLwiN: Running MLwiN from within R >> http://www.bris.ac.uk/cmm/software/r2mlwin/
Post Reply
dimension3
Posts: 8
Joined: Thu Nov 03, 2016 11:17 am

Suppress warning

Post by dimension3 »

Hey there,
I'm sorry to bother again. Estimating this model:

Code: Select all

fit <- runMLwiN(y ~ 1 + cx + gx + (1 | id_c) + (1 | p) + (1 | id_g), 
       D = "Normal", data = data.wide, 
       estoptions = list(EstM = 1, debugmode = F, mm = list(NA, list(mmvar = list("p", "p2", "p3", "p4"), weights = list("w1", "w2", "w3", "w4")), NA)))
I get the warning that
Some input variable held data in more precision than MLwiN supports, these have been rounded
That cannot possible be as I round the data before:

Code: Select all

data.wide <- round(data.wide, 1)
While this of course does not pose any estimation problems, the warning is problematic in my case for I am conducting a simulation study and have to run the model 1000 times. Is there any way to suppress or redress this warning?

Kind regards,
Benjamin
ChrisCharlton
Posts: 1351
Joined: Mon Oct 19, 2009 10:34 am

Re: Suppress warning

Post by ChrisCharlton »

I can think of two possible options here:
  1. R2MLwiN provides the option to redirect or discard the output from MLwiN via the stdout and stderr parameters. These take the same options as the system2 function (http://stat.ethz.ch/R-manual/R-devel/li ... stem2.html), so setting these to NULL or FALSE will discard the messages
  2. A utility function called double2singlePrecision is provided as part of R2MLwiN. If you process your data frame with this then it will convert the variables stored in double precision to use single precision. This should also prevent the warning from appearing.
dimension3
Posts: 8
Joined: Thu Nov 03, 2016 11:17 am

Re: Suppress warning

Post by dimension3 »

Thank you so much! This:

Code: Select all

data.wide <- double2singlePrecision(data.wide)
worked for me.
Post Reply