Page 1 of 1

Individual versus group design covariate

PostPosted: Tue Sep 03, 2013 12:31 pm
by jlaake
Here is the summary of a query sent to me via email which I though might be useful for others to see. The example was use of Pradel model to look at impact of plot level variables on bird recruitment.

Their answer to a question I posed about the original query and my response:

User: This is not a robust design (as I understand it, RMark does not yet handle reverse time robust design models?)

My response: Most models in MARK are supported by RMark. I believe the Robust design Pradel model that you want is the RDpdf.... From the file models.txt in the RMark subdirectory in your R Library they are:

RDPdfClosed RDPdfClosed TRUE TRUE FALSE FALSE 1 0 1 FALSE
RDPdfHuggins RDPdfHuggins TRUE TRUE FALSE TRUE 1 0 1 FALSE
RDPdfHet RDPdfHet TRUE TRUE FALSE FALSE 2 0 1 FALSE
RDPdfFullHet RDPdfFullHet TRUE TRUE FALSE FALSE 2 0 1 FALSE
RDPdfHugHet RDPdfHugHet TRUE TRUE FALSE TRUE 2 0 1 FALSE
RDPdfHugFullHet RDPdfHugFullHet TRUE TRUE FALSE TRUE 2 0 1 FALSE

Each model supported by RMark is also listed in the MARK Help/Data Types

User: All the buffers are the same for all birds in a particular plot. I am not using the plot as a grouping factor - I am using the tree density on each plot as an individual covariate for all birds sampled on that particular plot.

My response: Given that you only have 8 plots and probably a fair number of birds per plot, it would be much better using groups="plot" and not using plot variables as individual covariates but as design covariates. The variable plot in your data must be a factor variable and if it is not currently you can use factor() function to change it to a factor variable. You can use merge_design.covariates to merge your buffer and other plot-level covariates into the design data and then use them with your formula. The advantage is that the real parameter values for each buffer and other plot level covariate is computed automatically whereas with an individual (bird-level) covariate you have to use a function to compute the real values (covariate.predictions). Also, design covariate models typically run much faster than individual level covariate models.

Here is an example with the dipper data. Pretend that sex is the same as plot in your example.

data(dipper)
dp=process.data(dipper,model="CJS",groups="sex")
ddl=make.design.data(dp)
df=data.frame(group=c("Male","Female"), buffer=1:2)
ddl$Phi=merge_design.covariates(ddl$Phi,df,bygroup=TRUE,bytime=FALSE)
head(ddl$Phi)
mark(dp,ddl,model.parameters=list(Phi=list(formula=~buffer)))

you have to add the covariate to the design data for each parameter that needs it as an explanatory variable.