To build a user-defined model in GENPRES, click 'model', then 'user-defined', (and un-check any previously checked models).
Next, click 'analyze w/ expected values' or 'analyze with simulated values' and when the model window appears, click 'edit' and 'paste from pre-defined model'.
When the pre-defined model window opens, choose whether you want to use MARK or PRESENCE, then choose a model similar to one you'll be creating. For example, to build a model with a time trend (monotonic increasing detection probs) for a single-season analysis, choose model 'psi,p(t)', then close the window.
The pre-defined model window should now contain the code needed for the psi,p(t) model. To modify it to use a linear time-trend covariate, we'll need to replace the identity design matrix with a different one. In Mark, the design matrix will be defined with the 'identity' keyword. Delete the word 'identity', and change the number of covariates to 3. Then add the following after the design matrix statement:
- Code: Select all
1 0 0;
0 1 0;
0 1 1;
0 1 2;
0 1 3;
0 1 4;
This is a design matrix for a 5-survey, single-season model. The first row is for the real variable, psi. The other rows are for the 5 p's. Here's the entire screen:
- Code: Select all
proc estimate link=Sin NOLOOP varest=2ndPart;
model={psi,p(t)};
group=1 Psi rows=1 cols=1 Square Constant; 1;
group=1 p Session 1 rows=1 cols=5 Square Time=2;
design matrix constraints=6 covariates=3;
1 0 0;
0 1 0;
0 1 1;
0 1 2;
0 1 3;
0 1 4;
blabel(1)=Psi; rlabel(1)=Psi;
blabel(2)=p; rlabel(2)=p;
proc stop;
If you want the output to contain the right labels, you can modify the blabels and rlabels. For this model, I would change: blabel(2)=p_intcept; and blabel(3)=p_timeffect;
If you choose Presence, just replace the design matrix for the p's with the numbers from the above matrix and change the number of columns from 6 to 3 (row and col counts include headers and labels in Presence).
If you have a specific model in mind that this doesn't help with, I'd be happy to help off-list.
Jim