megpetrie wrote:Hello,
I have searched for an example of how to set up an .inp file to code for multiple groups and individual covariates without luck.
Kudos on at least trying. Not surprising that you didn't find anything, because I don't think this has been addressed before (odd, since your questions considers a situation which I suspect is pretty common. I'll have to add this to the book for a future 'printing' -- thanks!)
I assume one must list individual encounter histories, and then a column of 1's to indicate the frequency for the second column. After that would I set up dummy variable columns (# of groups-1) before the column for the covariate?
Not quite (or I'm not quite understanding you). There are a couple of ways you could handle this. You can either code for the groups explicitly in the .inp file, or use an individual covariate for the groups. There are pros and cons to either approach (discussed in Chapter 11).
Here is an snippet from data set with 2 groups coded explicitly, and an individual covariate. In this snippet, the first 8 contiguous values are the encounter history, followed by 2 columns representing the frequencies depending on group: "1 0" indicating group 1, and "0 1" indicating group 2, followed by the value of the covariate:
- Code: Select all
11111111 1 0 123.211;
11111111 0 1 92.856;
11111110 1 0 122.115;
11111110 1 0 136.460;
So, the first record with an encounter history of 11111111 is in group 1, and has a covariate value of 123.211. The second individual, also with an encounter history of 11111111, is in group 2, and has a covariate value of 92.856. The third individual has an encounter history of 11111110, and is in group 1, with a covariate value of 122.115. And so on.
If you wanted to code the group as an individual covariate, this same input file snippet would look like:
- Code: Select all
11111111 1 1 123.211;
11111111 1 0 92.856;
11111110 1 1 122.115;
11111110 1 1 136.460;
Here, following the encounter history, is a column of 1's, indicating the frequency for each individual, followed by a column containing a 0/1 dummy code to indicate group (in this example, I've used a 1 to indicate group 1, 0 to indicate group 2), followed by the value of the covariate.