I would like to make my last and second-to-last gamma parameters equal to avoid confounding. I'm having trouble understanding the instructions in the help file for the robust example data, which uses "time.bins" for this purpose:
here it is done by binning the times so that times 3 and 4 are in the same bin, so the time model
# has 3 levels (1,2, and 3-4). By doing so the parameters become identifiable but this may not be
# reasonable depending on the particulars of the data. Note that the same time binning must be done both for
# GammaPrime and GammaDoublePrime because the parameters are the same in the random emigration model. If you
# forget to bin one of the parameters across time it will fit a model but it won't be what you expect as it will
# not share parameters. Note the use of the argument "right". This controls whether
# binning is inclusive on the right (right=TRUE) or on the left (right=FALSE). Using "right" nested in the list
# of design parameters is equivalent to using it as a calling argument to make.design.data or add.design.data.
#
S.time=list(formula=~time)
p.time.session=list(formula=~-1+session:time,share=TRUE)
GammaDoublePrime.random=list(formula=~time,share=TRUE)
model.4=mark(data = robust, model = "RDHuggins", time.intervals=time.intervals,design.parameters=list(GammaDoublePrime=list(time.bins=c(1,2,5))),
right=FALSE, model.parameters=list(S=S.time,GammaDoublePrime=GammaDoublePrime.random,p=p.time.session))
1. In the example data, there are four gamma"s, and the third and fourth are set to equal (i.e. put in the same bin) using time.bins. How come the time bins are c(1,2,5)? I don't understand where the 5 comes from.
2. In the example, right=FALSE, meaning that "binning is inclusive on the left". I don't understand what this means (sorry!).
3. The instructions point out that the same binning must be done for both Gamma' and Gamma", but in the example model above, the time.bins are only created for GammaDoublePrime and the share function is used. Is it necessary to create bins for both parameters if using "share"?
4. If my time intervals are uneven when I create bins, do I use 1,2,etc. as above, or do I create time.bins based on the time values in my ddl (e.g. 1,57,etc.).
Here are the first few lines of my design data for GammaDoublePrime:
- Code: Select all
group cohort age time Cohort Age Time fire sex time_dummy
1 EarlyF 1 0 1 0 0 0 Early F 0
2 EarlyF 1 56 57 0 56 56 Early F 0
3 EarlyF 1 72 73 0 72 72 Early F 1
4 EarlyF 1 336 337 0 336 336 Early F 0
5 EarlyF 1 384 385 0 384 384 Early F 0
6 EarlyF 57 0 57 56 0 56 Early F 0
7 EarlyF 57 16 73 56 16 72 Early F 1
8 EarlyF 57 280 337 56 280 336 Early F 0
9 EarlyF 57 328 385 56 328 384 Early F 0
10 EarlyF 73 0 73 72 0 72 Early F 1
Thank you!
Annabel.