Dear Ingrid,
I am a bit at a loss explaining what could be happening.
Just for my own sanity, I checked the same code on the demo model and it seems to give sensible results:
divorce | break_partner | |
| False | True | total
False | 9961 | 29 | 9990
True | 29 | 0 | 29
total | 9990 | 29 | 10019
The only case where I can see divorce and break_partner to be both true at the same time (for the 157 individuals in your groupby), would be if somebody has him/herself as partner.
You could use:
>>> dump(filter=id == partner_id)
to check that.
As for why you have more divorce than break_partner, the only explanation I see is that you have inconsistent partner links somewhere (person X has person Y as partner but person Y has somebody else as partner -- or no partner at all).
You can find those using:
>>> dump(filter=partner_id != UNSET and partner.partner_id != id)
Also, you are using version 0.12, right (not that I can explain the behavior using an earlier version, but it helps to be on the same page)?
If the above does not help, I would need to somehow be able to execute your code myself to see what is happening behind the scene. Would it be possible for you to send me (not on the mailing list) some _runnable_ code & dataset which exhibits the problem?
Hope it helps,
Gaëtan
--
You received this message because you are subscribed to the Google Groups "liam2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
liam2-users...@googlegroups.com.
To view this discussion on the web, visit
https://groups.google.com/d/msgid/liam2-users/03db1eee-ef48-406a-bbdc-3a00b6df5acf%40googlegroups.com.