How to merge list of roaster1 and Roster2 to form a new Roster as Roster3

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
sham
Posts: 69
Joined: February 3rd, 2022, 7:30 pm

How to merge list of roaster1 and Roster2 to form a new Roster as Roster3

Post by sham »

Hi Sherrell, Gregory, htuser and the rest of the family on this plat form,
My issue is not resolve yet. I need your help urgently pls on the above subject.
Below is the logic I used which is not working so well. am sure there is mixed up somewhere.

Hi Family,

Please I need your support to meet to be able to meet the is deadline.


// Prefill in names in names roster from enumerator data file


numeric numPreloadIndividuals = count(MEMBER_DICT.MEMBER_REC);

do numeric i = 1 while i <= numPreloadIndividuals
if SA1_5(i) = "Child" then
ID_OF_CHILD(i) = PID(i);
CHILD_S_NAME(i) = S1_2(i);
endif;
enddo;
do numeric i = 1 while i <= count(LEAP1000R_DICT.SEC2B);
ID_OF_CHILD(i) = NEW_MEMBER_ID(i);
CHILD_S_NAME(i) = Concat(SEC2BQ2(i),"",SEC2BQ3(i));

enddo;



After testing the logic , I realized for example if in Roaster SECA1 , the number of children listed are 3 and occupying's Curocc() position 3, 4 ,5 and in RoasterSEC2B If I capture 1 new child and maybe the child occupied curocc() position1.
So the results in Roaster SEC3. is messing up...The list either override the other and or it create some gabs especially when the new child added it is just 1. You will see in Roaster SEC3. the new child will occupy Row1 and row2 will be vacant and and the old children also joined occupying the curocc(3,4 and 5) respectively..

Please somebody help.

Sham.
I attached the file
Attachments
leap1000R.zip
(118.85 KiB) Downloaded 82 times
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: How to merge list of roaster1 and Roster2 to form a new Roster as Roster3

Post by sherrell »

Hi Sham,

Reviewing your application, several issues that should be addressed (or that I addressed):

[1] unless you have a strong reason not to, you should allow partial save (especially when testing)
[2] I have never seen relationship and sex codes stored as strings; unless there is a strong reason to do this, value sets should be used; see the dictionary for changes to these two variables
[3] all numeric dictionary variables should have defined ranges; generally, most if not all dictionary variables are numeric (you have a lot of alpha)
[4] It's unclear why the child data is being split across two records (SEC2B and SEC3). You can take one record and split it across several rosters, there does not have to be a 1-to-1 correspondence between dictionary records and rosters. I have moved the SEC3 variables to SEC2B. This will make it easier to reference each child.
[5] Must all HHs have children? If so, then SEC2B can be required; otherwise it should not be required
[6] is there a reason the record type for SECA1 is non-numeric? (it's J) Generally record types are numeric
[7] BLID was only 1 digit, yet you allow for 60 occurrences in the record; i believe you want this to be 2 digit?
[8] in your member.csdb file you have a single field for the person's name, but in the child roster you now separate the first & last name--how are the names from the HH roster supposed to be transferred to the child roster? these should be consistent
[9] after you've loaded these HH members from the members.csdb file, did you want to allow the enumerator to add more people? (this isn't clear). If so, see the additional variable & logic I've added to handle this
[10] FYI, your skip was wrong on SA1_6, see the correction

But to answer your question: what are you asking your enumerators to do, recopy the names of the children from the first roster, SEC1A? For I didn't see any logic to make anything happen with this. If so, why not just copy them over as you did to set up your first roster? You don't indicate what the criteria is to place children in the SEC2A roster--is it by relationship (child) or age (< 18 for example). If it's relationship, then I hope it's ok to have a 50 year old "child" appear in this roster. I've chosen to use age. Repeat what I've done for the last roster, tho use the child_roster_id there instead of the child_HH_ID

FYI, we are a small shop, just a few people, and we travel overseas to work with statistical agencies. When this occurs (staff are out of the country), we have even fewer people to respond to queries (which is what happened over the the past month). We do see your queries, don't despair, but we just don't always have the bandwidth to respond. So, if you could just limit your query to either here on the forum (preferred, as then others benefit from the conversation) or to cspro@lists.census.gov, and then just make a single posting/submission, that would really help with our workload. Thanks!

Let me know if you have any questions.
Sherrell
leap1000R (smg).zip
(23.15 KiB) Downloaded 79 times
sham
Posts: 69
Joined: February 3rd, 2022, 7:30 pm

Re: How to merge list of roaster1 and Roster2 to form a new Roster as Roster3

Post by sham »

Hi Sharrell,
First of all I want to sincerely apologize for you and the entire crew for putting undue pressure. I actually did not understand your schedule and the number of people addressing our concerns here and I do appreciate you for giving me inside of what's happening.
Nonetheless, with your size, you guys are doing a very great job and building some of us despite your busy schedule you still respond swiftly.
All your comments are well noted.

Now I want to respond to your 10points queries may be by the time am done answering this question it would help all of us.
For Point 1,2,3,7 and 10 I strongly agree with you.
But for the others
Point 4. Yes Roaster SEC2B is capturing new child who were born after the baseline data. For SEC3 IS A COMBINE ROASTER FOR THE NEW CHILD/CHILDREN IN SEC2B AND THE FILTERED CHILDREN FROM THE PRELOAD ROASTER IN SECA1. So they are 2 different Rosters please
Point5:. Not necessarily I think there was a screener that I forgot to add.
Point6: No reason I think it was an error on my side, you are right

Point8:. Yes that child roaster is meant to capture new children who were not captured during the baseline. So because we don't have the child's record that is why the Roasters in SEC2B seek to collect.
Point9: No please, I don't want to. I want to restrict the Roaster to the number of preloaded hh members from the baseline.


But so far I have downloaded your corrected version and it makes a lot of sense. (But in SEC2BQ6 showing different condition(one is Age and the value set is demanding for sex confirmation).
But To help resolved all my concerns, I am sharing a snap shot of the questionnaire demanding all those conditions to broaden our understand and for solutions.

Thank you very much once again, am standing...
Sham
Attachments
Woman questionnaire_17.09.2021-for IRB - Word 17_05_2022 5_04_19 am.png
Woman questionnaire_17.09.2021-for IRB - Word 17_05_2022 5_04_19 am.png (69.12 KiB) Viewed 2160 times
Woman questionnaire_17.09.2021-for IRB - Word 17_05_2022 5_02_41 am.png
Woman questionnaire_17.09.2021-for IRB - Word 17_05_2022 5_02_41 am.png (64.8 KiB) Viewed 2160 times
Woman questionnaire_17.09.2021-for IRB - Word 17_05_2022 5_02_00 am.png
Woman questionnaire_17.09.2021-for IRB - Word 17_05_2022 5_02_00 am.png (89.84 KiB) Viewed 2160 times
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: How to merge list of roaster1 and Roster2 to form a new Roster as Roster3

Post by sherrell »

Hi Sham,

re: pt 9: if you don't want extra people to be added, you need to lock that down to the enumerators then; i.e., there should be logic that exits the roster when this happens (I've added logic to the BILD preproc). however, if the enumerator is only confirming whether a person is still in the HH, you should probably be locking down most of the other fields.

in the SEC2 roster where you want to add kids born since the baseline, you should have a filter Q (i've added), and you'll need to add in logic to control the exit if you want it to work in system-controlled. i've switched it to operator controlled for purposes of me testing this (which causes an empty record to occur, since the line # is locked down)

same deal w/sec3, you need to add logic to exit after you've added in the kids from the 2 rosters, and you should lock down whatever info was entered from the HH and new kids roster (like name, and if you add in sex & age to the roster, which I would think would be useful, esp. if there are 2 kids in the HH w/the same name).

>But in SEC2BQ6 showing different condition(one is Age and the value set is demanding for sex confirmation).
i had the value set for age showing sex, so that was a mistake; i've changed it to 0-17 (assuming a child is no longer a child at 18)

See attached for the update, hopefully this answers all your questions and you can fine tune it without a problem.

Sherrell
leap1000R (smg2).zip
(9.18 KiB) Downloaded 85 times
sham
Posts: 69
Joined: February 3rd, 2022, 7:30 pm

Re: How to merge list of roaster1 and Roster2 to form a new Roster as Roster3

Post by sham »

Hi Sharell and great Family,
Thank you so much for your technical support.
Am so much grateful for your patients.

I entered the LEAP1000R_ID and it was not confirming so when I checked the preload files (Emload.csdb and member.csdb) I noticed that they were all empty(zero cases), so I re-copied them and replaced and everything is find though I for what I did I don't know whether it will have some issues moving forward?.

Thank you for addressing all the concern and I leant a lot of new things from this great family hoping to get more opportunity like this to learn more and impact others with the Cspro programming.


Sham.
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: How to merge list of roaster1 and Roster2 to form a new Roster as Roster3

Post by sherrell »

Hi Sham,

I didn't include any csdb files on the last zip file to you. So, if you ran the application and didn't copy those files in, CSPro would create them, and they would be empty.

Sherrell
sham
Posts: 69
Joined: February 3rd, 2022, 7:30 pm

Re: How to merge list of roaster1 and Roster2 to form a new Roster as Roster3

Post by sham »

All right noted, and thanks very much @sherrel.

Sham
Post Reply