Here's a summary of the discussion Jeff and I had off the listserv about using design matrix functions to create individual covariates vs hard coding individual covariates into the input data. I've included a snippet of my data to illustrate hard coding.
/*Columns are "BearID", capture history, Count, "Sex", "InvDistSq", "Dist"*/
/*Sex coded: 1=Female, 0=Male*/
/*1*/ 1000000000 1 1 0.374079997 1.635;
/*2*/ 1000000000 1 1 0.1927048125 2.278;
/*3*/ 1011100010 1 1 0.0957320361 3.232;
/*4*/ 1000000000 1 1 0.1810774106 2.35;
/*5*/ 1111000000 1 1 0.374079997 1.635;
/*6*/ 1000000000 1 1 0.1641760072 2.468;
/*7*/ 1000010000 1 0 0.1084916878 3.036;
/*8*/ 1000100100 1 0 0.4795850247 1.444;
/*9*/ 1011000001 1 0 0.1587276392 2.51;
/*10*/ 1000110000 1 0 0.374079997 1.635;
"InvDistSq" is the inverse of distance squared (i.e., 1/(Dist^2)) and, of course, "Dist" is a distance measure used as an individual covariate. The inversed distance squared covariate can also be created in the design matrix by way of the power function (i.e., power(Dist,-2)). As I mentioned in a previous message, I built a model, where p=c and p is modeled solely as a function of the inversed distance squared, using 2 different methods. The first method used the hard coded "InvDistSq" and the second used the design matrix function. Both methods produced the same AICc, Deviance, betas, etc. However, the real parameter estimates were different. In my case, I specified the mean individual covariate values to be used to calculate reals. The mean "Dist" was 1.9491295 and mean "InvDistSq" was 0.3179616. As Jeff pointed out, the 2 methods were:
using different covariate values because 1/( mean dist)^2 is not equal
to the mean (1/dist^2).
INVDISTSQ 0.3179616
DIST 1.9491295
It is using 0.3179616 for the one estimate and
1/(1.9491295)^2=0.2632198 for the other. Thus
> plogis(-2.0243193+0.8301871*.3179616)
[1] 0.1467463
> plogis(-2.0243193+0.8301871*.2632198)
[1] 0.1411468
>
However neither of these may be what you are looking for.which would be
the mean p for the population. That is more difficult to compute
because you need to know the distribution of individuals at each value
of dist.
Thanks Jeff!