kin_multi_stage_time_variant_2sex.R needs updating to reflect Focal's fathers multi-state distribution.#45
Merged
IvanWilli merged 3 commits intoIvanWilli:mainfrom Jun 4, 2025
Merged
Conversation
Updating Focal's parents 2-dimensional age*stage distribution at birth. Previous code repeated mother's dist. for father. Joe error
removing wrongly placed file
Owner
|
Hi Joe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Ivan,
I have recently been working on UK parity specific kinship with two sexes, and noticed that the DemoKin code I provided you does not correctly implement the age*stage distribution of Focal's father. As such I have adjusted the file
kin_multi_stage_time_variant_2sex.R. Note that the only kin affected by the previous error is Focal’s father: no other kin within Focal’s network are affected.The changes in the file can be found in functions
all_kin_dyandall_kin_dy_TV, where in the matrix projections, I have changedX_parents[,1](i.e., the distribution of Focal's parents in her first age-class) to reflect both mother and father (lines 400 and 618), moving from the input:parents_joint_age_stage<- population_age_stage_of_parenting[[2]] toparents_joint_age_stage <- population_age_stage_of_parenting[[1]](lines 342, 354, 562, and 575).In doing so I noticed that trying to join two sparse vectors using
c(.)does not work so have moved torbind(). These changes occur in the functionspi_mix,pi_mix_TV,pi_mix_parityandpi_mix_TV_parity(lines 887, 915, 958, and 997 resp.).Sorry for this. I guess sometimes we find mistakes in code which we do not expect! I am sending this request with an updated version of
kin_multi_stage_time_variant_2sex.R. The only changes involve what I mention above.Hope that you are well.
Joe