longitudinal data (multilevel- 3 levels) with missing data at level 1

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

Remember to check out our extensive software FAQs which may answer your question: http://www.bristol.ac.uk/cmm/software/s ... port-faqs/
Post Reply
rmansoor
Posts: 5
Joined: Mon Nov 14, 2016 3:58 pm

longitudinal data (multilevel- 3 levels) with missing data at level 1

Post by rmansoor »

Dear all,

I'm new to MLwiN and want to use MLwiN to analyse my longitudinal data (multilevel- 3 levels). The data structure takes the form of repeated measures (level 1) nested within the individual (level 2) and individuals nested within higher level cluster (e.g. school or centers). However, I have some missing values (at Level 1). Does anyone know if I can use multiple imputation in MLwiN on my multilevel data (3 level )?

Thanks in Advance

Best Regards// Mansoor
richardparker
Posts: 61
Joined: Fri Oct 23, 2009 1:49 pm

Re: longitudinal data (multilevel- 3 levels) with missing data at level 1

Post by richardparker »

Hi Mansoor - you might be interested in new functionality which has recently been released to support the analyses of incomplete datasets in Stat-JR (distributed with MLwiN); see http://www.bristol.ac.uk/cmm/news/2016/85.html. This new functionality includes a template (NLevelImpute) which performs multiple imputation for N-level models.

To use this you will need to download and install Stat-JR (http://www.bristol.ac.uk/cmm/software/s ... er-statjr/), and then download the zipped file containing the templates from CMM's missing data page (http://www.bristol.ac.uk/cmm/research/missing-data/).

Best wishes,

Richard
rmansoor
Posts: 5
Joined: Mon Nov 14, 2016 3:58 pm

Re: longitudinal data (multilevel- 3 levels) with missing data at level 1

Post by rmansoor »

Dear Richard,

Many thanks for your reply. I just downloaded and install Stat-JR and was running a simple model. but in
the run phase I'm getting the following error.

Thanks in advance.

Best Regards// Rashid

Traceback (most recent call last):
File "webtest.py", line 375, in go
File "C:\StatJR\packages\eStat.py", line 1196, in run
self.runcode(str(self.eng.outputs['modelcode.cpp'].content), self.vars[chainnum], self.data)
File "C:\StatJR\packages\eStat.py", line 832, in runcode
result = runcode(code, self.scode, locals, globals)
File "O:\repo\stat-jr\src\lib\EStat\Utils.py", line 141, in runcode
File "c:\Python27\lib\site-packages\weave\inline_tools.py", line 366, in inline
File "c:\Python27\lib\site-packages\weave\inline_tools.py", line 496, in compile_function
File "c:\Python27\lib\site-packages\weave\ext_tools.py", line 373, in compile
File "c:\Python27\lib\site-packages\weave\build_tools.py", line 242, in build_extension
File "c:\Python27\lib\site-packages\weave\platform_info.py", line 125, in get_compiler_dir
ValueError: The 'gcc' compiler was not found.
richardparker
Posts: 61
Joined: Fri Oct 23, 2009 1:49 pm

Re: longitudinal data (multilevel- 3 levels) with missing data at level 1

Post by richardparker »

Hi - can I just check: did you install the C++ compiler MinGW? Instructions can be found here: http://www.bristol.ac.uk/cmm/software/s ... stallation

Best wishes,

Richard
rmansoor
Posts: 5
Joined: Mon Nov 14, 2016 3:58 pm

Re: longitudinal data (multilevel- 3 levels) with missing data at level 1

Post by rmansoor »

Dear Richard,
now its working, thanks a lot, I greatly appreciate it! now i am searching an example of three level.. As I mentioned in the first message, my data structure takes the form of repeated measures (level 1) nested within the individual (level 2) and individuals nested within higher level cluster (e.g. school or centers)...
For your information, my data have missing values at level-1 only ( missing values only in dependent/outcome variable), no missing values at level-2 and level-3)....

I would appreciate it if you could send me an example of three level...

Best Regards// Rashid
rmansoor
Posts: 5
Joined: Mon Nov 14, 2016 3:58 pm

Re: longitudinal data (multilevel- 3 levels) with missing data at level 1

Post by rmansoor »

Dear Richard,

I am using NLeveIImpute templet for my data! Can you please check the attached example of stat-jr- setting up a model, if it is correct or not!

My outcome variable is hb_new (normal) and explanatory variable: Dayofobs/time (categorical)
i am fitting three level model, as I mentioned in the first message, my data structure takes the form of repeated measures (level 1) nested within the individual/patients ID (level 2) and individuals nested within higher level cluster (e.g. school or centers).
For your information, my data have missing values at level-1 only ( missing values only in dependent/outcome variable), no missing values at level-2 and level-3)....

Thanks in advance!

Best Regards// Rashid
NLevelImpute.docx
(91.45 KiB) Downloaded 1801 times
richardparker
Posts: 61
Joined: Fri Oct 23, 2009 1:49 pm

Re: longitudinal data (multilevel- 3 levels) with missing data at level 1

Post by richardparker »

Hi - sorry I didn't have the opportunity to reply to your earlier post - if you just have missing data in your (univariate) response in your model of interest, then imputing values via multiple imputation will not contribute any further information to your analysis - e.g. the introductory section of this paper, by von Hippel (2007; e.g. p.4), discusses the issue: https://lbj.utexas.edu/sites/default/fi ... %20Y's.pdf
Post Reply