I get the same slope values when exchanging categorical variables. I expect differences (since the data suggest that the UV will have the largest lambda, and trap catch count means were certainly not equal):
unique(d$trap) #BG (default intercept category), EVS, UV, CDC
d$trap.EVS <- ifelse( d$trap=="2" , 1 , 0 ) #"2" used to match cvs file
d$trap.UV <- ifelse( d$trap=="3", 1 , 0)
d$trap.CDC <- ifelse( d$trap=="4" , 1 , 0)
# Got a = 4.49 (mean) using BG as default intercept
#when I redo same calculation using EVS:
d$trap.BG <- ifelse( d$trap=="1" , 1 , 0 ) #EVS now default slope "a"
d$trap.UV <- ifelse( d$trap=="3", 1 , 0)
d$trap.CDC <- ifelse( d$trap=="4" , 1 , 0)
# Got a = 4.49 (mean) using EVS as default inercept
#model follows:
NAM1.0 <- map(
alist(
count ~ dpois( lambda ),
log(lambda) <- a + bt.BG*trap.EVS + bt.UV*trap.UV + bt.CDC*trap.CDC,
a ~ dnorm(0,10),
bt.BG ~ dnorm(0,1),
bt.UV ~ dnorm(0,1),
bt.CDC ~ dnorm(0,1)
),
data = d)
precis(NAM1.0)
#Results for letting BG = intercept default
> precis(NAM1.0)
Mean StdDev 5.5% 94.5%
a 4.49 0.04 4.43 4.55
bt.EVS -0.97 0.07 -1.08 -0.85
bt.UV 0.58 0.05 0.51 0.66
bt.CDC 0.10 0.05 0.01 0.18
Please advise.