selection error

10 views
Skip to first unread message

ischoc...@gmail.com

unread,
Aug 27, 2020, 4:08:50 AM8/27/20
to liam2-users

Dear all

When simulating the number of people in collective households, we ran into the strange result explained in attachment. In short, the selection of individuals at risk for the process "mortality" occurs almost entirely on the basis of the variable "to_collective_household", although seemingly, the processes are not related in any way. 

Can anyone give me a clue to what might be happening?

regards,

Ingrid

mortality and transition to collective households.docx

Gaëtan de Menten

unread,
Oct 1, 2020, 5:13:42 AM10/1/20
to liam2...@googlegroups.com

Hello Ingrid,

 

After looking again at your code, I think what you are seeing is caused by using align() in both cases with a constant score expression. Since persons are sorted by decreasing score (before the N first individuals are picked by category, normally picking the N highest scores per category), that sort does effectively nothing and persons stay "sorted by id". Which means that in both cases, the alignment will pick the same ids first for each age.

 

I assume replacing 0.0 by uniform() in all three align() expressions should fix your issue. Regardless of whether this was the cause of your issue, you should nearly always have some form of random component in the score of an align() function, so you might want to check the rest of your code for other cases like this. For completeness, you might have been confused because logit_regr(0.0, align=…) works fine. That's because logit_regr includes a random component out of the box.

 

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/6aa6b7ca-d01b-4289-b208-2b15781af2den%40googlegroups.com.



Disclaimer: This e-mail may contain confidential information which is intended only for the use of the recipient(s) named above.
If you have received this communication in error, please notify the sender immediately and delete this e-mail from your system.
Please note that e-mail messages cannot be considered as official information from the Federal Planning Bureau.

ischoc...@gmail.com

unread,
Oct 1, 2020, 9:56:38 AM10/1/20
to liam2-users
Dear Gaetan

Many thanks! I didn't realize. It works fine now!

Regards,
Ingrid

Reply all
Reply to author
Forward
0 new messages