- Code: Select all
GvolCJS.proc=process.data(GvolCJS,model="CJS",begin.time=1,groups=c("SEX","SITE"),time.intervals=c(3.5,3.25,3,9.75,3.5,3,3.25,3.5,4.25,2.5,4.25,2,3.25,3,1.75,1.5,1.5,1.75,1.5,1.5,1.25,2,1.25,1.5,1.25,2.75,2.25,1,2,2.25,2.25,5.25,2.5,0.75,0.75,1.25,2.25,1),nocc=39)
GvolCJS.ddl=make.design.data(GvolCJS.proc, parameters=list(Phi=list(pim.type='time'),p=list(pim.type='time')))
GvolCJS.ddl=add.design.data(GvolCJS.proc,GvolCJS.ddl,parameter="p",type="time",bins=c(1,90.75,96),name="capType",right=FALSE)
with(GvolCJS.ddl$p, table(capType, time))
produces this:
- Code: Select all
time
capType 4.5 7.75 10.75 20.5 24 27 30.25 33.75 38 40.5 44.75 46.75 50 53 54.75 56.25 57.75 59.5 61 62.5 63.75 65.75 67 68.5
[1,90] 15 15 16 16 15 13 13 13 13 14 16 15 14 13 12 12 12 13 12 13 13 14 14 15
(90,96] 1 1 0 0 1 3 3 3 3 2 0 1 2 3 4 4 4 3 4 3 3 2 2 1
time
capType 69.75 72.5 74.75 75.75 77.75 80 82.25 87.5 90 90.75 91.5 92.75 95 96
[1,90] 15 15 14 12 13 13 11 11 11 9 9 10 11 13
(90,96] 1 1 2 4 3 3 5 5 5 7 7 6 5 3
If I don't constrain the PIM types, it works fine:
- Code: Select all
time
capType 4.5 7.75 10.75 20.5 24 27 30.25 33.75 38 40.5 44.75 46.75 50 53 54.75 56.25 57.75 59.5 61 62.5 63.75 65.75 67
[1,90.8) 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 256 272 288 304 320 336 352 368
[90.8,96] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
time
capType 68.5 69.75 72.5 74.75 75.75 77.75 80 82.25 87.5 90 90.75 91.5 92.75 95 96
[1,90.8) 384 400 416 432 448 464 480 496 512 528 0 0 0 0 0
[90.8,96] 0 0 0 0 0 0 0 0 0 0 544 560 576 592 608
I can also get the results I want by setting up the capType variable manually:
- Code: Select all
GvolCJS.ddl$p$capType2 = 'basic'
GvolCJS.ddl$p$capType2[GvolCJS.ddl$p$time %in% c(90.75,91.5,92.75,95,96)] = 'tree'
GvolCJS.ddl$p$capType2=factor(GvolCJS.ddl$p$capType2)
Was I wrong to constrain the PIM types? I thought pim.type='time' was okay if one doesn't have any age or cohort covariates.
I'm using RMark version 2.0.0, in case that matters.
Thanks,
Jeff