Hi,
I am analysing data of woodpecker-made holes and I am interested in seeing what covariates and to what degree affect the survival of these holes (otherwise known as cavities). However, I encounter the complication that quite many trees contain multiple holes and thus, if the tree falls (which is the most common cause of a cavity death) it takes all these cavities in that tree down. Therefore, I wanted to have the tree's identity number as a random effect in my model. Thus I added frailty(tree_id) to my R script in the coxph function.
Another type of correction that I applied for more than one cavity in a single tree was to only keep 1 cavity and give it the median "age" value of all these cavities that were present in the particular single tree. The covariates that I test for do not change per cavity, but rather per tree.
Which approach is correct, if any?
Thank you very much for your help in advance!
Alwin