Hi,
Out of a single-season site-occupancy model containing 10 covariates, I want to show the effect of one categorical covariate on psi with histograms that include profile confidence intervals/SE. The covariate is called “sediment” with three factor levels (gravel, sand, mud), coded by two dummy variables with “gravel” as the reference sediment type (0 0).
Herefore, I calculated psi separately for the three sediment types as followed (it’s coded in R):
psi_gravel <- exp(b0+b1*0+b2*0)/(1+exp(b0+b1*0+b2*0)) #gravel (0 0)
psi_sand <- exp(b0+b1*1+b2*0)/(1+exp(b0+b1*1+b2*0)) #sand (1 0)
psi_mud <- exp(b0+b1*0+b2*1)/(1+exp(b0+b1*0+b2*1)) #mud/loam (0 1)
That part worked. However, it’s unclear to me, how I get the SE/CI for these habitat types and how the SE/CI are constrained to take values between 0 and 1. I was told that I could construct the SE based on the betas (b0=gravel, b1=sand, b2=mud) and the variance-covariance-matrix of the model. As SE for gravel is likely the intercept, I could grab this value from the presence-output.
When it comes to the other sediment types (sand, mud), several questions emerge:
a) In my case, the best-selected model I use for the predictions has 10 betas? Do I have to take the 2 columns/rows that correspond to b0 and b1 to calculate the SE for sediment type sand or mud (b0, b2), i.e. cut down the relevant columns of the 10x10 vcov-presence-matrix to a 2x2 vcov-matrix? Or do I have to construct the vcov-matrix by myself, based on b0 and b1 (or b0, b2)?
b) What does the formula for constructing the SE look like? And, has anybody done that so far already in R?
I appreciate any hint,
Cheers,
Lukas