Page 1 of 1

Cohort models age monitoring

Posted: Thu Jun 29, 2017 3:54 pm
by moudi
I wanted to implement a feature in a population cohort model where age classes can be monitored (e.g. 0-24, 25-34, etc.). For this reason I referred to the sample model "CohortPop+ageMonitorAlt" and used the construction presented there for "childbearing age". So an attribute "Age range 0 to 24" has been created which should receive the information about the age of the cohort. Together with the action "update age range", this attribute can be used to create a new subcollection (age range 0 to 24). So far it works fine.

However I tried to provide this attribute with several items (age 0 to 24, 25 to 34, etc.). This does not work. One solution would be to create a number of attributes for each age class... but this is not very attractive. Is there a better solution? I also tried to use an auxiliary with an if then else functionality, but here I cannot use/convert double to feed the attribute.
Test Group Cohort1m_attribute_age3.zip
(20.44 KiB) Downloaded 410 times

Re: Cohort models age monitoring

Posted: Thu Jun 29, 2017 4:37 pm
by tomfid
There isn't a good solution for this yet.

What I've done, for a very limited set of age classes, is to create an "age class" attribute, and use a command action to update it based on the nominal age of the cohort.

However, the "else if" syntax doesn't work for attribute initialization in attributes, so this requires creation of one action per class.

Sorry. We'll get there.

Re: Cohort models age monitoring

Posted: Fri Jun 30, 2017 12:00 pm
by moudi
Thank you. It's good to know where to look for a better solution :-) and where not!

Re: Cohort models age monitoring

Posted: Fri Jun 30, 2017 2:57 pm
by tomfid
Actually, I think we have a solution. I'll post ASAP.

Re: Cohort models age monitoring

Posted: Sun Jul 02, 2017 10:03 pm
by LarryYeager
Just added a feature that directly supports grouping attribute values within numeric ranges for a variable or expression. This will be part of Release 1.1, sometime next week.

Re: Cohort models age monitoring

Posted: Tue Jul 04, 2017 5:45 am
by moudi
Good. I'm looking forward to this!