Developing Encounter Histories for Multistate Model

questions concerning analysis/theory using program MARK

Developing Encounter Histories for Multistate Model

Postby ddaversa » Wed Sep 26, 2012 5:44 am

Hi all:

I am new to MARK and have a very basic question that I can not seem to find the answer to:

Does anybody know of an efficient way to develop encounter histories that use letters (e.g. ABA0CA), such as those input into multi-state models?

For CJS models I have usually used excel pivot tables to make my numeric (e.g. 011010101) encounter history files. However, excel pivot tables do not preserve text formatting, so making encounter history tables for multi-state models is not possible in this manner.

I apologize greatly if this topic has already been covered. I promise to have RTFM and searched the forum well.

Looking forward to hearing your replies.

Best,

Dave Daversa
ddaversa
 
Posts: 1
Joined: Tue Sep 25, 2012 11:30 am

Re: Developing Encounter Histories for Multistate Model

Postby cooch » Wed Sep 26, 2012 7:19 am

ddaversa wrote:Hi all:

I am new to MARK and have a very basic question that I can not seem to find the answer to:

Does anybody know of an efficient way to develop encounter histories that use letters (e.g. ABA0CA), such as those input into multi-state models?

For CJS models I have usually used excel pivot tables to make my numeric (e.g. 011010101) encounter history files. However, excel pivot tables do not preserve text formatting, so making encounter history tables for multi-state models is not possible in this manner.

I apologize greatly if this topic has already been covered. I promise to have RTFM and searched the forum well.

Looking forward to hearing your replies.

Best,

Dave Daversa


You are correct in that there is nothing in the book on 'how to generate' encounter histories (MS or otherwise). That's because (i) there is nothing in MARK (the software) to handle management/ creation of encounter histories, since (ii) there is no single preferred approach to doing this (since it would necessarily be determined by how the 'raw data' were formatted/stored in the first place).

And as for how to do it 'in Excel', can't help you, since I don't use Excel for anything (I'm not even sure if I have it on my computer, since I don't use Office either). Personally, I use SAS or R to handle almost everything. I'm sure there are folks out there who have some solutions for you. Good luck.
cooch
 
Posts: 1654
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

Re: Developing Encounter Histories for Multistate Model

Postby Urge4Sturg » Thu Nov 01, 2012 1:13 pm

its been a month since you posted, so maybe you have come up with a solution for this. I have used excel pivot tables and logical statements for this task, I suggest creating a dummy code for your different states and carrying these through the pivot table, then using a logical statement in a new column to convert the codes to letters. My data were originally a list with tag#, year, and length (cm). If i recall correctly, i created the normal "10..." EC's in a pivot table using tag# in row labels, year in column labels, and count of tag# in values. Then i made sure there was only 1 record for all tags in a given year(i.e. nothing >1). Once i was sure there was only 1 record per individual per year, i used tag# as the row, year as the column, and sum of length as the values. This returns the a table with length in place of the 1's and 0's. I then added a new column next to each year column and used an if-then statement to give lengths from 0-96 a "J", 97-137 a "S", and 137+ an "A". Concatenate these new coded columns and you should be on your way. In your case, convert whatever numerical codes you make for your states into corresponding letters. Hope this helps, or if you have found a better way to do this in excel, let me know.

Cheers!
Urge4Sturg
 
Posts: 8
Joined: Wed Mar 07, 2012 7:07 pm


Return to analysis help

Who is online

Users browsing this forum: No registered users and 3 guests