Level Identifiers

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/
SabineKatzdobler
Posts: 18
Joined: Sat Sep 05, 2020 10:22 am

Level Identifiers

Post by SabineKatzdobler »

Good day Chris,

thanks for your great effort during the last week. I am still trying to work within MLwin 3.05 directly.

However, I am confused about the level-identifiers. I tried out different options regarding the identifiers at level 1 and level 2. MLwin messages told me to create a "bcons"-variable. After creating it and putting it a level 1 (since a contiguous variable for level 2 is important) the error messages (see appendix) came up. What can I do?

Kind regards,

Sabine
Attachments
afterOverwriting.PNG
afterOverwriting.PNG (8.11 KiB) Viewed 1366 times
bcons_error.PNG
bcons_error.PNG (6.88 KiB) Viewed 1366 times
model_def.PNG
model_def.PNG (7.16 KiB) Viewed 1366 times
ChrisCharlton
Posts: 1244
Joined: Mon Oct 19, 2009 10:34 am

Re: Level Identifiers

Post by ChrisCharlton »

MLwiN should automatically create a bcons column if necessary and you would just apply the level identifiers as they exist in your data. I would suggest that you find a model similar to yours in the MLwiN manual (see https://www.bristol.ac.uk/cmm/software/ ... nuals.html) and check that you are able to fit this. Once you are happy with setting it up you can adapt the model to your data.
ChrisCharlton
Posts: 1244
Joined: Mon Oct 19, 2009 10:34 am

Re: Level Identifiers

Post by ChrisCharlton »

I should add that if you're already familiar with runmlwin you can use this to set up the model. To do this just make sure that you haven't specified the nopause option, then once it has started up MLwiN and set up the model you can just click the Abort Macro button and carry on from there.
SabineKatzdobler
Posts: 18
Joined: Sat Sep 05, 2020 10:22 am

Re: Level Identifiers

Post by SabineKatzdobler »

Great, thank you. I have already found several examples.

Unfortunately, another challenge came up. For the level identifiers I now have according to the LEMMA-examples: Level 1: resp_indicator; Level 2: Measurement Occasion, Level 3: case id (1,23,4, etc.). Please let me ask the following question:

Every time I ticked the check box "k(case_id_long)" MLwin crashes, so that I have to reopen MLwin again. Is my specification in the level identifier wrong or is this due to other reasons? Let me please ask additionally, if you could provide an example dataset with an ordered categorical outcome variable and within-between-random effects specification?
ChrisCharlton
Posts: 1244
Joined: Mon Oct 19, 2009 10:34 am

Re: Level Identifiers

Post by ChrisCharlton »

MLwiN shouldn't crash when you make changed to the model, even if the specification is wrong. Can you confirm that you are using the most recent version (3.05), as I am not aware of any current bugs which would cause this?
SabineKatzdobler
Posts: 18
Joined: Sat Sep 05, 2020 10:22 am

Re: Level Identifiers

Post by SabineKatzdobler »

Good day Chris,

yes, sure, I can confirm that I use MLwin 3.05 (64-bit version).

In addition to the "crash"-problem, I would like to ask how I can specify "measurement occasion" when several persons responded at only two times of data collection and some at all three time points. Is it okay if some measurement occasions are missing?
So far, I have already tried to create all combinations of occasions for each variable in "Split Records" (following another post) - however MLwin tells me that all cells in the grid must be specified.

Kind regards,

Sabine
ChrisCharlton
Posts: 1244
Joined: Mon Oct 19, 2009 10:34 am

Re: Level Identifiers

Post by ChrisCharlton »

If it is at all possible to provide me with an example worksheet, along with replication instructions for the crash I can look into what is causing this to happen.
SabineKatzdobler
Posts: 18
Joined: Sat Sep 05, 2020 10:22 am

Re: Level Identifiers

Post by SabineKatzdobler »

Hi Chris,

please find below the way that produced the crash. The attached file involves the corresponding worksheet. Maybe you have an idea what exactly caused the crash and what I should do.

y – Look for New Positn
N-level – 1: case_id (sequence 1, 2, 3, etc.)
Ordered Multinominal: Multinominal / logit / Ordered proportional odds / ref category: LookNwPositin_100

Add Term: cons / add seperate coefficient /
Estimates – Start – Estimates

Nonlinear: Use Defaults (MQL) / Done

Add Term: cons / add common coefficient / include all / Done
Estimates

Back to „resp“
N level: 3 -jik
level 3 (k): case_id_long
level 2 (j): occ
level 1 (i): resp_indicator
(y: resp)

Error message MLwiN: see attachment

Error message ignored / OK / Done (Y variable)

Click on cons.0102030405060708090
X variable
Checkbox: Uncheck Fixed Parameter
Trying to check k(case_id_long)
MLwiN crashes, so that I have to re-open it again.

In the meantime, I set "occ" (measurement occasion) as the sequence vector (1,2,3, etc.) and put in N level 1(i). This was technically successful, however I find the solution not plausbile, since the time periods are no longer recognizeable as such. Is this problematic?
Attachments
OrderedMultinominal_Yvariable.PNG
OrderedMultinominal_Yvariable.PNG (75.06 KiB) Viewed 1237 times
Worksheet_example_sk.dta
(52.41 KiB) Downloaded 49 times
ChrisCharlton
Posts: 1244
Joined: Mon Oct 19, 2009 10:34 am

Re: Level Identifiers

Post by ChrisCharlton »

Sorry that this has taken a while for me to be able to look into.

Can you confirm that you specified a denominator for your response (by clicking on the red nj in the equation), as I was able to get the software give the following error if I omitted this and then attempted to run the model:

Code: Select all

---------------------------
Error detected by MLN
---------------------------
design vector at level 2 is the wrong length
(moni 0)
---------------------------
OK   
---------------------------
If I carried on after this then the software would crash.

Setting up a model that did include this however didn't give any errors, and although I got a variance of zero for the random effect it did produce estimates.

The data that you provided did not actually provide a case_id variable, so I created this as a sequence from 1 to 330, however I now notice that this actually matches the contents of your occ variable. Is this correct, as I would have expected these variables to be different?
SabineKatzdobler
Posts: 18
Joined: Sat Sep 05, 2020 10:22 am

Re: Level Identifiers

Post by SabineKatzdobler »

Good day Chris,

thanks for your response.

Yes, I can confirm that I added the denominator into the red nj. I used a cons (=1) vector.
Regarding the level identifiers: When I specified case-id (1,2,3, etc.) and measurement occasion (e.g. 1,1,1) I get the error message in the attachment.
However, when I specify it as person_id (e.g. 1,1,1) and occ (1,2,3, etc.) I get no error message and MLwiN lets me continue working. That is why I ignored this error message until now. So it was technically successful, however I find the solution not plausbile, since the time periods are no longer recognizeable as such. Is this problematic? I would appreciate it if you could have a look at my dataset (I will post it soon).

Kind regards,

Sabine
Attachments
error_message_case_id123_long_occ111.PNG
error_message_case_id123_long_occ111.PNG (69.05 KiB) Viewed 1164 times
Post Reply