Closed adam-s-elder closed 3 years ago
@andsv2 : please look into whether this issue affects our current work on the CombPrevNet branch.
@smjenness : this does not impact CombPrevNet as only partnerships containing active individuals are filtered down into partner identification. Having said that, this is probably something that should be investigated in general.
@andsv2 : Ok, but for safety I think this needs to be handled more consistently. Because currently, these rows on the plist will never get a stop time recorded, and so they will never be truncated. So instead, I would like: If anyone on the plist dies, the stop time for the partnership should get recorded, just as it does if the edge dissolves naturally. Then, when it comes time to truncate the plist, it should be done the same way for all rows (if at - stop
> truncate time). Ok?
Closed by #44
Currently in EpiModel, the plist is updated at every step. In particular, the time at which a relationship ends will be recorded based on results of a call to tergmLite::simulate_network. Unless specified otherwise, code comes from here: https://github.com/EpiModel/EpiModelHIV-p/blob/CombPrev/R/mod.simnet.R
Thus, the entries in plist that are assigned are based on the updated edgelist (specifically the "changes" attribute of the dat$el[[ptype]] object):
Then, the plist is updated latter on by dropping those who's relationships have stopped:
However, this method for dropping individuals from the plist fails to drop relationships that are ended by an ego exiting the population (I think). Code in the mod.departure script drops edges:
However, I don't think these changes are stored in the dat$el[[ptype]] changes attribute as a result, these relationships stored in the plist will never be assigned a date for the relationship ending, and thus the will never be dropped from the plist.
I am not sure how important this is to anyone else, or how clear this is. If anyone has questions, just let me know. Thanks!