How to create .INP file?

questions concerning analysis/theory using program MARK

How to create .INP file?

Postby komonen » Thu Oct 04, 2007 10:48 am

The Gentle Introduction to Mark gives an excellent and understandable piece-by-piece introduction to the logic behind mark-recapture analysis and the Mark software. Except,

it does not tell how to technically create a .INP file (i.e transform .txt file to .inp file)?

Without this information the manual is not for "complete morons", and thus I (and many others) won't be able to use the program either.

Cheers, Atte
komonen
 
Posts: 2
Joined: Thu Oct 04, 2007 10:19 am

Re: How to create .INP file?

Postby cooch » Thu Oct 04, 2007 11:04 am

komonen wrote:The Gentle Introduction to Mark gives an excellent and understandable piece-by-piece introduction to the logic behind mark-recapture analysis and the Mark software. Except,

it does not tell how to technically create a .INP file (i.e transform .txt file to .inp file)?

Without this information the manual is not for "complete morons", and thus I (and many others) won't be able to use the program either.

Cheers, Atte


As stated quite explicitly in Chapter 2 (did you read it?) - wrt to creating .INP files (i.e., the simple text file containing the encounter histories).

While this is easy enough in principal, you surely don’t want to have to construct capture-histories manually. Of course, this is precisely the sort of thing that computers are good for - large-scale data manipulation and formatting. MARK does not do the data formatting itself - no doubt you have your own preferred “data manipulation" environment (dBASE, Excel, Paradox, SAS). Thus, in general, you’ll have to write your own program to convert the typical “vertical" file into capture histories. In fact, if you think about it a bit, you realize that in effect what you need to do is to take a vertical file, and “transpose" it into a horizontal file - where fields to the right of the individual tag number represent when an individual was recaptured or resighted. However, while the idea of a matrix transpose seems simple enough, there is one rather important thing that needs to be done - your program must insert the “0" value whenever an individual was not seen. We’ll assume for the purposes of this book that you will have some facility to put your data into the proper encounter history format. Of course, you could always do it by hand, if absolutely necessary!


In other words, MARK doesn't create encounter histories - you will need to figure out how to do it yourself, using either a database manipulation program of some kind (several are mentioned), or by hand. The .INP file is just a text file you've given the .INP extension to. This is also stated quite explicitly in Chapter 2:

It (.INP file) consists of an ASCII (text) file, consisting of the encounter history itself (the contiguous string of dummy variables), followed
by one or more additional columns of information pertaining to that history. Each record (i.e., each line) in the encounter histories file ends with a semi-colon. By convention, the encounter histories file
has a .INP suffix (for example, EXAMPLE1.INP). This is not required, but since MARK initially “looks" for encounter history files ending with .INP, it is recommended that you follow this convention if possible.



Much of this information is also contained in the MARK helpfile, which I guessing you didn't consult.
cooch
 
Posts: 1652
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

converting .txt to .inp

Postby ganghis » Thu Oct 04, 2007 11:27 am

Atte,

Start by creating a .txt file of encounter histories, etc.

I am assuming you're using Windows... click File > Save As
In the "Save as type:" field, change it to "All Files"
Now type "myfile.inp" in the "File name" field. This will change the extension.

-Paul
ganghis
 
Posts: 84
Joined: Tue Aug 10, 2004 2:05 pm

Thanks Paul

Postby komonen » Fri Oct 05, 2007 3:15 am

It worked. The advice you gave is just the bit of information that Morons like me need, and it should be added in the manual, as several colleagues have struggled with the same problem.

It should read like this in the manual:

"Start by creating a .txt file of encounter histories, etc. If you are using Windows... click File > Save As In the "Save as type:" field, change it to "All Files" Now type "myfile.inp" in the "File name" field. This will change the extension."

And what was the most crucial bit of information here: Change the "Save as type" to "All fields". Simple as that!

Cheers, Atte
komonen
 
Posts: 2
Joined: Thu Oct 04, 2007 10:19 am

Postby JonL » Tue Oct 16, 2007 8:45 am

I understand why you asked. Although most infiormation is actually in the "Gentle introduction", it is not always easy to find. Things that are obvious when you know them can be quite difficult to find before that. Fortunately we have the forum.

Jon
JonL
 
Posts: 14
Joined: Mon May 07, 2007 5:38 am

Re: How to create .INP file?

Postby wdorman » Thu Sep 16, 2021 1:01 pm

Do you know of any r packages that can create a .inp file from an excel file? I haven't been able to find one, but it seems like on must exist.
wdorman
 
Posts: 1
Joined: Thu Sep 16, 2021 12:31 pm

Re: How to create .INP file?

Postby cooch » Thu Sep 16, 2021 1:10 pm

Addendum to Chapter 2 in the MARK book. There is no single R package that converts 'Excel -> .inp'. But it is relatively straightforward to use R to suck things out of Excel, and spit things into an .inp file.
cooch
 
Posts: 1652
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

Re: How to create .INP file?

Postby jlaake » Thu Sep 16, 2021 3:01 pm

I have thought about it but the problem is that there is no single structure for the capture history and everyone structures their data differently, so it would be an onerous task to create a generic package to do that. But as Evan said there are tools in R to do it or you can use crosstab in Excel if you prefer

Jeff
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA


Return to analysis help

Who is online

Users browsing this forum: No registered users and 1 guest