Hi,

I want to look at factors that predict outcome (ordered 0-4). The factors I want to look at are all person level specific (sex, socioeconomic status, ethnicity etc) aside from region. My actual dataset contains ~2000 people with ~10,000 outcomes.

People (id) are nested within region. There will also be some clustering by grade (grade of person at time of outcome).

I plan to run a multi-level ordinal logistic regression and report results in OR. In this command ids are nested by region, but is this the right way to incorporate grade? As region is obviously not nested by grade.


meglm outcome sex || grade: || region: || id:, family(ordinal) link(logit) cov(unstructured) or

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float(id year grade outcome sex region)
1 2012 3 0 0 3
1 2013 4 0 0 3
1 2014 5 0 0 3
1 2015 6 0 0 3
2 2010 3 0 1 9
2 2011 4 1 1 9
3 2011 5 0 0 5
3 2012 5 2 0 5
3 2013 6 0 0 5
3 2014 6 3 0 5
4 2017 8 4 1 1
5 2010 4 0 1 2
5 2011 5 0 1 2
5 2012 6 0 1 2
5 2013 6 3 1 2
5 2014 6 4 1 2
6 2016 6 0 0 7
6 2017 7 0 0 7
7 2015 3 1 0 8
end
------------------ copy up to and including the previous line ------------------


This is my first attempt at understanding and implementing multi-level analysis so apologies if some of my terminology is not correct. I have tried to read all of the relevant literature but being a non-mathematician I have found this very difficult.

Than you for any help,
Carla