Hello,
I have four questions regarding fitting models to data with group design covariates, with the explanation of the problem given below:
1. Why are parameter estimates produced for the finest group structure even for models which don't specify all group design covariates?
2. How do I get estimates and confidence intervals for parameters only for groups specified in a model, even when a more detailed group structure is present in the design data list?
3. If there is no possible way to do Question 2, and considering my sparse data, do I need to set up a number of different design data lists for each of the relevant combinations of group design covariates (e.g. ddl1<-groups=c("age","sex"), ddl2<-groups=c("sex","fire"), etc.) and is it valid to compare models based on different design data lists?
4. Why are the model selection results so different between a ddl with three groups and one with 13 groups even when the candidate models were exactly the same?
If anyone can help with this it will be greatly appreciated,
Annabel.
Explanation of problem:
I am working with the robust design with the aim of estimating the effect of time since fire category (early, medium, late) on abundance, survival and capture probabilities. I also want to investigate the effect of the sex and age of the animals and the occasion-specific covariates rainfall and temperature on the model parameters. I have 43 secondary occasions within six primary periods of 8,7,6,8,7,7 days in length.
I set up my design data list with all three group design covariates specified (age, sex and fire category) and then added temp and rainfall to the design data. With all possible combinations of the three group design covariates, the data consist of 13 different groups. My data are fairly sparse: I have a total of 139 animals and daily recapture rates between 5 and 25 %. Dividing them into 13 groups therefore drastically reduces power. Given this constraint, I am trying to limit the number of parameters that I include in my models. For example, I would like to compare models that include fire effects to those with sex effects, and also examine interactive effects, for e.g. between fire and sex. Even though I have a maximum of 13 groups, I would probably not include all three group design covariates in one model, but want them all available for comparing different models.
Even when I write a model including only temperature effects on p and fire effects on N, based on a ddl with three group design covariates (mdd1):
mod2<-mark(process1,mdd1,
model.parameters=list(S=S.dot,GammaDoublePrime=GDP.dot,p=p.mintemp,N=N.fire),
model.name="13 groups,mod2",output=FALSE)
the derived parameters for N are still estimated for each of the 13 groups, when I expected to get results for only three groups (fire category: early, medium and late). The real parameters are given only for x of the 13 groups, where x is the number of groups specified for a particular parameter. In the above example the sum of N for all groups within each fire category equals a number close to the actual number that I captured in each category. But I don't know how to get an actual estimate for the group with confidence intervals.
I created a new design data list which only specified fire category (three groups). I ran four identical candidate models on the ddl with 13 groups and the ddl with 3 groups. I modelled the parameters only as functions of either 1, time related variables, or fire (details in the script below). The results from the model list are different for the ddl with 13 groups and the ddl with 3 groups. The top model for 13 groups is different to the top model for 3 groups, even though only fire groups were specified for both. The models with 3 groups have a much better fit to the data, even though it is the same data, and the same parameters, but different group structure.
model npar AICc
3 groups,mod7 16 609.125
3 groups,mod8 26 611.516
3 groups,mod6 7 623.669
3 groups,mod5 4 671.690
13 groups,mod2 7 1038.545
13 groups,mod3 16 1039.424
13 groups,mod1 4 1051.463
13 groups,mod4 26 1058.053
# Script:
dat<-import.chdata(filename="pinks_all_covar2.txt",header=T)
int<-read.table(file="int.txt",header=F)
# Group design based on 13 groups: all possible combinations of "fire" (early, med, late), "sex" (M, F, U)
# and "AdJ" (adult, juvenile). "U" in "sex" stands for unknown and is restricted to juveniles (it's sometimes not
# possible to determine the sex of a juvenile).
process1<-process.data(dat,model="Robust",begin.time=1,time.intervals=int,groups=c("fire","sex","AdJ"))
mdd1<-make.design.data(process1)
# Group design based on three groups only (fire category): early, medium and late
process2<-process.data(dat,model="Robust",begin.time=1,time.intervals=int,groups="fire")
mdd2<-make.design.data(process2)
# I have also specified occasion specific data for each design data list, details of which are not shown because the script is very long.
# My study species is a gecko and capture rates are likely to be highly dependent on daily temperature.
# Parameters
S.dot<-list(formula=~1)
S.fire<-list(formula=~fire)
S.fire_time<-list(formula=~fire+time)
GDP.dot<-list(formula=~1,share=TRUE)
p.dot<-list(formula=~1,share=TRUE)
p.mintemp<-list(formula=~mintemp,share=TRUE)
p.mintemp_fire<-list(formula=~mintemp+fire,share=TRUE)
p.mintemp_fire_session<-list(formula=~mintemp+fire+session,share=TRUE)
N.dot<-list(formula=~1)
N.fire<-list(formula=~fire)
N.fire_session<-list(formula=~fire+session)
N.rfall_fire_session<-list(formula=~rfall+fire+session)
# Models for the data with 13 groups:
mod1<-mark(process1,mdd1,
model.parameters=list(S=S.dot,GammaDoublePrime=GDP.dot,p=p.dot,N=N.dot),
model.name="13 groups,mod1",output=FALSE)
mod2<-mark(process1,mdd1,
model.parameters=list(S=S.dot,GammaDoublePrime=GDP.dot,p=p.mintemp,N=N.fire),
model.name="13 groups,mod2",output=FALSE)
mod3<-mark(process1,mdd1,
model.parameters=list(S=S.fire,GammaDoublePrime=GDP.dot,p=p.mintemp_fire,N=N.fire_session),
model.name="13 groups,mod3",output=FALSE)
mod4<-mark(process1,mdd1,
model.parameters=list(S=S.fire_time,GammaDoublePrime=GDP.dot,p=p.mintemp_fire_session,N=N.rfall_fire_session),
model.name="13 groups,mod4",output=FALSE)
# Models for the data with 3 groups (exactly the same parameters as mod1-mod4):
mod5<-mark(process2,mdd2,
model.parameters=list(S=S.dot,GammaDoublePrime=GDP.dot,p=p.dot,N=N.dot),
model.name="3 groups,mod5",output=FALSE)
mod6<-mark(process2,mdd2,
model.parameters=list(S=S.dot,GammaDoublePrime=GDP.dot,p=p.mintemp,N=N.fire),
model.name="3 groups,mod6",output=FALSE)
mod7<-mark(process2,mdd2,
model.parameters=list(S=S.fire,GammaDoublePrime=GDP.dot,p=p.mintemp_fire,N=N.fire_session),
model.name="3 groups,mod7",output=FALSE)
mod8<-mark(process2,mdd2,
model.parameters=list(S=S.fire_time,GammaDoublePrime=GDP.dot,p=p.mintemp_fire_session,N=N.rfall_fire_session),
model.name="3 groups,mod8",output=FALSE)
res1<-collect.models(type="Robust")
res1