Constraints for cross-classification
Posted: Wed Dec 05, 2012 6:09 pm
Hello,
I would like to fit a multilevel model with binary responses and a crossed effect.
My data is structured as follows: level1: approx. 800 loans, level2: 700 borrowers, level3: crossed effects because borrowers can be clustered by 15 agents or 20 regions.
I declare a fourth level, create dummy variables for each region and constrain the variances to be equal:
forvalues i = 2/20 {
constraint define `i' [RP3]var(s`i') = [RP3]var(s1)
}
runmlwin def cons, level4(cons: s1-s20, diagonal) level3(agent: cons) level2(borrower: cons) level1(loan) discrete(distribution(binomial) link(logit) denominator(cons)) c(2/20)
I get the following error:
(note: constraint number 2 caused error r(111))
...
(note: constraint number 20 caused error r(111))
matrix e(Cns) not found
I would highly appreciate recommendations on how to solve this problem.
I'm using the manual, stata log-files and the presentation slides. Is there more information available on cross-classification with binary responses that I've missed so far?
Thanks in advance.
I would like to fit a multilevel model with binary responses and a crossed effect.
My data is structured as follows: level1: approx. 800 loans, level2: 700 borrowers, level3: crossed effects because borrowers can be clustered by 15 agents or 20 regions.
I declare a fourth level, create dummy variables for each region and constrain the variances to be equal:
forvalues i = 2/20 {
constraint define `i' [RP3]var(s`i') = [RP3]var(s1)
}
runmlwin def cons, level4(cons: s1-s20, diagonal) level3(agent: cons) level2(borrower: cons) level1(loan) discrete(distribution(binomial) link(logit) denominator(cons)) c(2/20)
I get the following error:
(note: constraint number 2 caused error r(111))
...
(note: constraint number 20 caused error r(111))
matrix e(Cns) not found
I would highly appreciate recommendations on how to solve this problem.
I'm using the manual, stata log-files and the presentation slides. Is there more information available on cross-classification with binary responses that I've missed so far?
Thanks in advance.