Batch runs in PRESENCE

questions concerning analysis/theory using program PRESENCE

Batch runs in PRESENCE

Postby mtingley » Mon Nov 26, 2007 5:10 pm

I heard a rumor that on the old listserve there was a discussion of doing batch runs in PRESENCE. Was there any conclusion or useful advice?

I'm interested in running the same model set on dozens of different data sources. I'm well aware of importing model sets from other output files, but I was curious if anyone had had any luck with speeding up the process so that you don't have to run every data set (i.e. species) individually.

Thanks for your help - Morgan Tingley (UC Berkeley)
mtingley
 
Posts: 4
Joined: Mon Nov 26, 2007 2:48 pm
Location: UC Berkeley

Postby jhines » Mon Nov 26, 2007 8:59 pm

I haven't heard the rumor, but it can be done if you know how to create text files and run programs from the command window. Each 'source' would have an input file (whatever.pao) containing the presence/absence data, along with the covariates. The model to be run is defined by another file containing the design matrices (whatever.dm). If all sources have the same number of surveys, you could use the same design matrix file. Otherwise, the design matrix for detection probabilities will have a different number of rows. To run a model in batch mode for, say 3 sources (source1,source2,source3), you could create a batch file containing the following:

@echo off
presence i=source1.pao l=source1.out j=source1.dm model=100 name="psi(xyz),p(abc)"
presence i=source2.pao l=source3.out j=source2.dm model=100 name="psi(xyz),p(abc)"
presence i=source3.pao l=source3.out j=source3.dm model=100 name="psi(xyz),p(abc)"

The model=100 tells PRESENCE that you want a single-season custom model. Model=200 is multi-season. You can see the command options when you run the non-interactive version and look at the black command window after running a model.

If you have a need for anything more complicaated that this, I'd be glad to help.

Jim
jhines
 
Posts: 632
Joined: Fri May 16, 2003 9:24 am
Location: Laurel, MD, USA

Postby Matthew Bowser » Tue Sep 02, 2008 5:39 pm

You can do batch runs of PRESENCE using R scripts (and I am sure this could be done in other programming languages). It is pretty reasonable to have R generate the required .pao files, call PRESENCE over the command line as Jim wrote above, and retrieve the parameter estimates from the output files.

Matt
Matthew Bowser
 
Posts: 6
Joined: Wed Nov 28, 2007 5:18 pm


Return to analysis help

Who is online

Users browsing this forum: No registered users and 0 guests