I'd like to fit a model with student and teacher random effects. The ID variables for students and teachers are stdntid and tchid. There are about 1,000 teachers and 10,000 students. Students are not nested within teachers.

The only command I know that will fit such a model is something like this:
Code:
mixed absent ib(2).classtype ib("k").gradenum i.schid || _all: R.tchid || studntid:
Correct me if my syntax isn't quite right.

Anyhow it won't run. I know because this simpler model, with only student random effects,
Code:
mixed absent ib(2).classtype ib("k").gradenum i.schid || _all: R.studntid
takes forever, and this model, with only teacher random effects,
Code:
mixed absent ib(2).classtype ib("k").gradenum i.schid || _all: R.tchid
returns an error: "likelihood evaluates to missing".

Clearly I can't run a model with both teacher and student random effects if I can't run a model with teacher or student random effects alone. At least not in -mixed-.

If the -mixed- command isn't usable for this model, is there something else that is? Many thanks for suggestions.

Best,
Paul