Selecting appropriate indices for time varying covariates

Hi all,
I am running RDMultScal models to determine factors impacting prevalence and detection of Bd and ranavirus in larval amphibians. In my top model, there is an effect of larvae species and temperature of the pond on detection of the disease. In this case, temperature is a time varying covariate while species is coded in to the .ddl as 0 or 1 for both theta (prevalence) and p as a parameter index(?).
I have run in to a snag when using covariate.predictions(). I wanted to use covariate.predictions() to estimate p for each species at a range of temperatures. So I orginially used
Where indices 534 and 2093 should correspond to species = 0 and 1 respectively. However, when I plotted that, one species had a straight line even though the betas indicate it should have a negative slope. The only difference I realized was in the session: model.index 534 had session = 1 while model.index 2093 had session = 5. When I change the indices so that both are from session 1, then the estimates from covariate.predictions() match what I expect.
I'm confused because according to my supervisor as long as we choose any 2 indices where species = 0 and 1, then it should give the correct output, but it doesn't. Are we misunderstanding how indices work in a dynamic model?
Thanks!
Reed
I am running RDMultScal models to determine factors impacting prevalence and detection of Bd and ranavirus in larval amphibians. In my top model, there is an effect of larvae species and temperature of the pond on detection of the disease. In this case, temperature is a time varying covariate while species is coded in to the .ddl as 0 or 1 for both theta (prevalence) and p as a parameter index(?).
I have run in to a snag when using covariate.predictions(). I wanted to use covariate.predictions() to estimate p for each species at a range of temperatures. So I orginially used
- Code: Select all
pXTemp <- covariate.predictions(psi1eps1gamma1$Psi.null.Epsilon.year.Gamma.null.Theta.SppXCond.p.SppXTemp,
data = temp_data,
indices = c(534,2093))
Where indices 534 and 2093 should correspond to species = 0 and 1 respectively. However, when I plotted that, one species had a straight line even though the betas indicate it should have a negative slope. The only difference I realized was in the session: model.index 534 had session = 1 while model.index 2093 had session = 5. When I change the indices so that both are from session 1, then the estimates from covariate.predictions() match what I expect.
I'm confused because according to my supervisor as long as we choose any 2 indices where species = 0 and 1, then it should give the correct output, but it doesn't. Are we misunderstanding how indices work in a dynamic model?
Thanks!
Reed