HLM_exercise

Hierarchical models and meta-analysis exercise

NOT in methods and results format. Only requirement is to submit R and WinBugs (if necessary)code with annotations for each task.

1) Use the following data set of your own hierarchically structured data. The warbler dataset contains information on nest failure of warblers in 28 forested stands in the southeast US. Nests were monitored during egg incubation and it was recorded if the eggs failed to hatch (1=yes, 0 =no). Given the binary response, you will be using logistic regression, i.e., (family = binomial). The data set contains the following:

STAND: Identification number of stand

FAIL: Binary variable representing nest failure, 1= yes, 0 = no

SNG.DEN: Stand-level measure of snag density, no/ha

MID.HT: Stand-level measure of the height (m) of mid-story vegetation

MIN.T: Stand-level measure of average daily minimum temperature (oC)

TOT.PPT: Stand-level measure of total precipitation (mm)

CONF: Variable indicating when a nest is in a conifer tree (1=yes, 0 = no)

DBH: Diameter of tree containing the nest (m)

NST.HT: Height of the nest from the ground (m)

Complete the following:

A) Create 4 models, each representing a hypotheses of the factors affecting nest failure.

B) Fit the global model using GLM and evaluate goodness of fit and independence assumptions

C) If necessary, fit a hierarchical model if necessary and select the best approximating error structure (if applicable).

D) Evaluate the relative support for each hypothesis using an information theoretic approach.

E) Interpret model selection results.

Bonus worth 50% extra, conduct v-fold cross-validation of the best model being very careful to not sneak in a stand-level effect.

2) The nest survival data set contains estimated annual survival and standard errors from 6 different studies (assume that the studies were comparable). Using the data set, complete the following:

A) Transform the survival estimates and standard errors using a logit link.

B) Use moments matching to estimate the combined survival.

C) Use MCMC methods to combine survival estimates.

D) Assume you have 2 years survival data from you own study- first year 55 of 120 animals survived, second year- 28 of 32 survived. Incorporate these 2 additional data points into the composite estimate of survival, be sure to justify your choice of method.

Bonus worth 50% extra if you use MCMC approach to complete D.