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!
I would like to draw Quantile-Quantile plots to check model assumptions. But when--and this is not uncommon-- I have missing observations, the caterpillarR throws an error at me:
> caterpillarR(mymodel['residual'], lev = 2)
Error in tt[1, 1, ] <- var :
number of items to replace is not a multiple of replacement length
In addition: Warning message:
In is.na(object) : is.na() applied to non-(list or vector) of type 'NULL'
Can I specify an option where caterpillarR omitts NAs? (running through the models again but with complete data is too tedious as I am running through many different specification)
The caterpillarR function is looking for data with names starting lev_2_resi_var, however these do not appear to have been output from your model. I suspect that this is probably the cause of the error message that you are seeing.
The default for resioptions is "variance", however if you specify you own options then this will not be automatically included. You will therefore need to add it to your list if you want to make use of it.