align_abs: double sorting criterium

6 views
Skip to first unread message

Ingrid Schockaert

unread,
May 21, 2019, 7:24:15 AM5/21/19
to liam2-users
Hi,

Is there a way to sort on two variables in align_abs?

That is, I would first sort on "number of persons" in the household. Secondly, for small households (1,2,3 persons), households with an older household head should be chosen first, and for large households, households with a young household head should be chosen first.


I tried the following: 
- score: logit_score(num_persons -2*age_head*num_persons), need, filter=is_candidate, link=persons)

But that did not work out very well: the number of missings is very high and only the age distribution for small households is nicely presented. Even only "Logit_score (num_persons)" increases the number of missings with more than 6000 in comparison with just "num_persons" as sorting criterium. 


Any suggestion?

Thanks in advance,
Ingrid


Gaëtan de Menten

unread,
Jul 19, 2019, 10:55:24 AM7/19/19
to liam2...@googlegroups.com

Sorry for the slow reply. I was (and I am still) catching up from all the things I left aside while I worked on the "dc2019" project and had some holidays…

 

I hope this is still relevant.

 

That is, I would first sort on "number of persons" in the household. Secondly, for small households (1,2,3 persons), households with an older household head should be chosen first, and for large households, households with a young household head should be chosen first.

 

I would do that with something like this:

 

    # between 0 and 1

    - rel_head_age: age_head / age_head.max()

    - score: if(num_persons <= 3, num_persons + rel_head_age, num_persons + 1 – rel_head_age)

 

As for the missings problem, this is probably the result of the high sensibility of the Chenard algorithm to the household sizes. If the large households are not picked quickly, there is a high chance they are not picked at all because at some point more members have ages that we have enough of than members with ages we still want. I honestly don't know what you can do to improve the situation. I have always wanted to implement a better algorithm for this but given my time constraints, I don't think I'll do it in the next 10 years.

 

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 post to this group, send email to liam2...@googlegroups.com.
Visit this group at https://groups.google.com/group/liam2-users.
To view this discussion on the web, visit https://groups.google.com/d/msgid/liam2-users/e3206be8-648a-4d36-a953-37692a4bcc3c%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.
Reply all
Reply to author
Forward
0 new messages