Page 1 of 1

Suppress warning

Posted: Wed Nov 16, 2016 2:47 pm
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

Re: Suppress warning

Posted: Wed Nov 16, 2016 3:57 pm
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.

Re: Suppress warning

Posted: Wed Nov 16, 2016 5:28 pm
by dimension3
Thank you so much! This:

Code: Select all

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