I have the following situation: General practitionar (gp), patient (pat) and consultation (cons).
Each gp has several patient and each patient can have 1 and more consultations with a specific characteristics cons_x. The outcome is y=0/1 on level consultation.
A possible model could be (in lmer/R notation)
y ~ gp_sex + pat_sex + pat_age + cons_x + (1|gp) + (1|gp:pat)
gp is a random variable and pat is nested in gp. Since the outcome is 0/1 (referral to specialist yes/no) the suitable model is a multilevel logistic regression.
(1) The problem: 50% of patients have only one consultation, that is, there is no repetition, others have 2, 3 until 6 consultations.I would like to know how to cope with this kind of situation. With other words: I have groups (patients) with only one consultation. So, within the group is perfect correlation due to the only member in the group. Does the mixed models framework cope with this?
(2) Another question which arises: The number of consultations weights the effect on patient since the same patient has as many entries as he has consultations. The more consultation a patient has the more patient characteristics are considered. This wouldn't be the case if all patient would have the same number of consultations.
Every help and hint is appreciated.
To simplify the analysis I could aggregate on level patient: If a patient has several consultations and at least one consultation has 1 then the patient has outcome 1 otherwise 0. Then I have a simpler model:
y ~ gp_sex + pat_sex + pat_age + (1|gp)
In this case problem (1) will be obsolete but than still I have problem (2) since each gp has different numbers of patients.