Code to run All Possible Models in MARK or PRESENCE

questions concerning analysis/theory using program MARK

Code to run All Possible Models in MARK or PRESENCE

Postby Breck » Tue Jan 13, 2009 5:26 pm

I'm doing an exploratory analysis relating occupancy of beavers to 7 vegetation classes that I'm using as site covariates. I'm not interested in a top model but instead would like to generate importance values for each of the 7 vegetation classes. I need a balanced model set which means running all possible models, in this case 128.

Before I run all these models manually, I was wondering if anyone has written code that can direct MARK or PRESENCE to manage the task of running all possible models and producing need output. The output I want is beta estimates for every variable in each model and AIC weights.



Thanks
Breck
 
Posts: 1
Joined: Tue May 18, 2004 11:44 am

RMark is your friend

Postby dhewitt » Tue Jan 13, 2009 5:38 pm

Your time, and more importantly the potential transcription errors, would be minimized by using RMark. Specifying all possible models for just seven site covariates would be a breeze, and then you'd have all the handy functions of R for manipulating and summarizing the results (betas).
dhewitt
 
Posts: 150
Joined: Tue Nov 06, 2007 12:35 pm
Location: Fairhope, AL 36532

Postby Doherty » Wed Jan 14, 2009 1:00 am

Stewart,

There is a way to run something akin to all possible models in Mark.

In Mark under the Run menu, try clicking on "Subset of DM Models". If you have a global model built with a design matrix (DM) and want to run all possible subsets of a set of columns within that DM, this option will do that.

The drop down boxes will look a bit strange at first, but will eventually makes sense. You will want some DM columns in all models (i.e., intercepts) and will want to choose "Always". Some columns you may never want to include ("Never"). Some columns you will always want to include together (like a time structure, or main effects with interactions) and the letters can be chosen to reflect this.

You might choose the little check box "Save Model Structures" to save all the structures to run at a future time, or if you want to review or delete some of them without running them.

You will still have to cut and paste the betas and AIC weights.

Paul
Doherty
 
Posts: 17
Joined: Wed May 28, 2003 3:23 pm
Location: Colorado State University

Postby cooch » Wed Jan 14, 2009 9:05 am

Doherty wrote:Stewart,

There is a way to run something akin to all possible models in Mark.

In Mark under the Run menu, try clicking on "Subset of DM Models". If you have a global model built with a design matrix (DM) and want to run all possible subsets of a set of columns within that DM, this option will do that.

The drop down boxes will look a bit strange at first, but will eventually makes sense. You will want some DM columns in all models (i.e., intercepts) and will want to choose "Always". Some columns you may never want to include ("Never"). Some columns you will always want to include together (like a time structure, or main effects with interactions) and the letters can be chosen to reflect this.

You might choose the little check box "Save Model Structures" to save all the structures to run at a future time, or if you want to review or delete some of them without running them.

You will still have to cut and paste the betas and AIC weights.

Paul



This is a really 'nifty trick' (from the Latin) which I haven't put in the linear models chapter in the book - will correct that oversight shortly. Thanks Paul.

In the interim, until Gary adds a capability to output betas (or anything else) from multiple models into a single file (Excel or otherwise), RMark is one option that is pretty well documented (as Dave notes in his reply).
cooch
 
Posts: 1652
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

Postby cooch » Wed Jan 14, 2009 3:29 pm

This is a really 'nifty trick' (from the Latin) which I haven't put in the linear models chapter in the book - will correct that oversight shortly....


Done - newly revised and uploaded Chapter 6. See subsection 6.5.1 (pp. 32-36).
cooch
 
Posts: 1652
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University


Return to analysis help

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron