Page 1 of 1

How to fix psi value by categorical covariate

PostPosted: Wed Aug 19, 2020 11:37 am
by mrrose
I cannot figure out how to fix psi values based on sites/units, or site/unit categorical covariates. The only example of fixing values I could find was for detection (in the genpres example).

I am trying to use habitat type as a occupancy covariate to investigate the effects of habitat type on several species. I have 3 types of habitat, including the baseline/intercept (factors a1, a2, and a3). The focal species was not found in a2 (the "forest" type), and as a result the beta estimate and SE for this factor have extremely large values (psi.psi.typeforest=-28.176516; SE=7.351706e+05).

the Design Matrix for psi (model$dmat$psi) is as follows:
a1 a2 a3
psi "1" "psi.typeforest" "psi.typeriparian"

I have tried using several ways to construct a data frame to use as the "fixed" data, but each time have gotten the message:
"fixed names must be in psi p1 p2 p3 p4 p5".

(There are 18 sites with 5 nights-sites 2,5,8,11,14,17 are forest type.)

Some of the attempts also triggered the following warning:
Error in fv[fixed$idx] <- fixed$value :
NAs are not allowed in subscripted assignments

What would the proper way to create a "fixed" data frame for this?

EDIT: After a second examination of my models I have found that some of the problem ones have potentially confounded variables/too many covariates for my sample size, and I will be constraining my model set to eliminate the issue.

However, I will leave the question up in hopes that it gets answered and an example/explanation of fixing psi parameters becomes available for RPresence here.