Restrict numbering

Other discussions about CSPro
MrTaco
Posts: 128
Joined: November 18th, 2014, 1:55 am

Re: Restrict numbering

Post by MrTaco »

I have another query. .. if I want to link person 1 on the household roster with the other person 1 on the other roster. jow do I code it... eg all the rosters have 21 persons.. I want to link each and every person to each person number on each roster that I have created. .
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Restrict numbering

Post by josh »

What do you mean by linking?
MrTaco
Posts: 128
Joined: November 18th, 2014, 1:55 am

Re: Restrict numbering

Post by MrTaco »

lets say I have 4 modules and each module consists of person 1 - 21 and different questions on each module... so let's created module 1 and there's head household so on eachodule they will be head of the household on the roster that I created. .. so I want to link head to all other roster on each modules. .
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Restrict numbering

Post by josh »

I get that you have mutiple modules and you want to link people across modules but you aren't telling me in practice what it means to link modules? Do you want to force them to be in the same rows in corresponding rosters? Do you want to have a variable in each row that refers to the row number in another module? What are trying to accomplish through the link? Is this for tabulation, for consistency checks, for export?

Usually if you have mutiple modules you want to make sure that the occurrence numbers match across modules so if in module 1 John is in row 1 and Bob is in row 2 then in module 2 john is also in row 1 and Bob is also is in row 2. To do this you collect the names in whatever order the interviewer wants in module 1 but in module 2 you force the interviewer to answer the questions in the same order as in the first module. You can do this by using the name from the first module in the CAPI question text in the second module e.g. "Did %NAME% work last year". Is this what you are asking about?
MrTaco
Posts: 128
Joined: November 18th, 2014, 1:55 am

Re: Restrict numbering

Post by MrTaco »

i want to force them to be in the same rows in corresponding rosters....?
or is there anyway I can be able use them both
1. force them to be in the same rows in corresponding rosters
2. have a variable in each row that refers to the row number in another module

and one another thing.. I have just realised that variable label doesn't change according to a number of person... lets say on the roster Q.1 First Name Q.2 Surname. .. it should at least show on the final data. . Q.1 person 1 First name or Q.1 first name person 1....?
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Restrict numbering

Post by josh »

Both approaches are possible. To have them be in the same rows use the CAPI question text as I mentioned previously.

To link them via variable in one record that refers to the occurrence in the other record you can create a numeric variable that will contain the line number of the linked record. You can then use a dynamic value set (using setvalueset()) to have the interviewer pick the person whose line number you want to point to.

You can use the function setocclabel() to modify the labels of rows in a roster at runtime.
MrTaco
Posts: 128
Joined: November 18th, 2014, 1:55 am

Re: Restrict numbering

Post by MrTaco »

Hi Josh am still learning hey.. your help and patience is totally appreciated

Please can you code this attachment for me, i will do other
Attachments
Linking the Persons in the household.zip
(12.24 KiB) Downloaded 367 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Restrict numbering

Post by josh »

I'm happy to answer questions and give advice but I can't write code for people. You will have to do that yourself or find a consultant to help you.
MrTaco
Posts: 128
Joined: November 18th, 2014, 1:55 am

Re: Restrict numbering

Post by MrTaco »

Thanks Josh

I will try to code it
Post Reply