Page 1 of 1

Problem defining initial.age and age.unit

PostPosted: Sun Mar 17, 2013 7:23 pm
by Lconcannon
Hi
Hope you can help. I am having problems defining the initial.age and age.unit for my analysis. I am new to R-Mark.
It's a 16-year data-set, the time interval is every 6-months so 32 occasions. The initial age is 6 months of age for all birds in the study (the current analysis is only dealing with the adult population; in this study system the majority of birds are ringed on the nest so age is known accurately). The oldest bird is just under 16 years of age but I need to create bins for the ages due to sparsity in the older age groups.

I have found examples of studies on this forum with monthly intervals (1/12) for age.unit but I cannot figure out how to define a 6-monthly interval or an initial age of 6 months. I am hoping I am missing something very simple and hope you can help.

Many thanks!

Re: Problem defining initial.age and age.unit

PostPosted: Mon Mar 18, 2013 11:34 am
by jlaake
There is no single correct answer to your question because you can use any units you want. But I'll assume that you want to use the most natural unit of 1 being a year so the reported survival is annual. In that case, your time.intervals=rep(0.5,31), initial.age=0.5. The default of age.unit=1 will work. Below is an example using the dipper data. Following that is another example.
Code: Select all
> dp=process.data(dipper,time.intervals=rep(0.5,6),initial.age=0.5,begin.time=0.5)
> dp.ddl=make.design.data(dp)
> dp.ddl$Phi
   par.index model.index group cohort age time occ.cohort Cohort Age Time
1          1           1     1    0.5 0.5  0.5          1    0.0 0.5  0.0
2          2           2     1    0.5   1    1          1    0.0 1.0  0.5
3          3           3     1    0.5 1.5  1.5          1    0.0 1.5  1.0
4          4           4     1    0.5   2    2          1    0.0 2.0  1.5
5          5           5     1    0.5 2.5  2.5          1    0.0 2.5  2.0
6          6           6     1    0.5   3    3          1    0.0 3.0  2.5
7          7           7     1      1 0.5    1          2    0.5 0.5  0.5
8          8           8     1      1   1  1.5          2    0.5 1.0  1.0
9          9           9     1      1 1.5    2          2    0.5 1.5  1.5
10        10          10     1      1   2  2.5          2    0.5 2.0  2.0
11        11          11     1      1 2.5    3          2    0.5 2.5  2.5
12        12          12     1    1.5 0.5  1.5          3    1.0 0.5  1.0
13        13          13     1    1.5   1    2          3    1.0 1.0  1.5
14        14          14     1    1.5 1.5  2.5          3    1.0 1.5  2.0
15        15          15     1    1.5   2    3          3    1.0 2.0  2.5
16        16          16     1      2 0.5    2          4    1.5 0.5  1.5
17        17          17     1      2   1  2.5          4    1.5 1.0  2.0
18        18          18     1      2 1.5    3          4    1.5 1.5  2.5
19        19          19     1    2.5 0.5  2.5          5    2.0 0.5  2.0
20        20          20     1    2.5   1    3          5    2.0 1.0  2.5
21        21          21     1      3 0.5    3          6    2.5 0.5  2.5
> dp.ddl$p
   par.index model.index group cohort age time occ.cohort Cohort Age Time
1          1          22     1    0.5   1    1          1    0.0 1.0  0.0
2          2          23     1    0.5 1.5  1.5          1    0.0 1.5  0.5
3          3          24     1    0.5   2    2          1    0.0 2.0  1.0
4          4          25     1    0.5 2.5  2.5          1    0.0 2.5  1.5
5          5          26     1    0.5   3    3          1    0.0 3.0  2.0
6          6          27     1    0.5 3.5  3.5          1    0.0 3.5  2.5
7          7          28     1      1   1  1.5          2    0.5 1.0  0.5
8          8          29     1      1 1.5    2          2    0.5 1.5  1.0
9          9          30     1      1   2  2.5          2    0.5 2.0  1.5
10        10          31     1      1 2.5    3          2    0.5 2.5  2.0
11        11          32     1      1   3  3.5          2    0.5 3.0  2.5
12        12          33     1    1.5   1    2          3    1.0 1.0  1.0
13        13          34     1    1.5 1.5  2.5          3    1.0 1.5  1.5
14        14          35     1    1.5   2    3          3    1.0 2.0  2.0
15        15          36     1    1.5 2.5  3.5          3    1.0 2.5  2.5
16        16          37     1      2   1  2.5          4    1.5 1.0  1.5
17        17          38     1      2 1.5    3          4    1.5 1.5  2.0
18        18          39     1      2   2  3.5          4    1.5 2.0  2.5
19        19          40     1    2.5   1    3          5    2.0 1.0  2.0
20        20          41     1    2.5 1.5  3.5          5    2.0 1.5  2.5
21        21          42     1      3   1  3.5          6    2.5 1.0  2.5
>

To make the point that the units are arbitrary I follow with another example in which the time unit is 6 months. In this case time=1 is 6 months, time=2 is a year etc. Your question made me realize that age.unit doesn't work in the current version if there are no grouping variables. I patched that and to make my second example work you'll need to install RMark 2.1.5 from the following link. https://docs.google.com/folder/d/0B77g1 ... sp=sharing

Code: Select all
> dp=process.data(dipper,time.intervals=rep(1,6),initial.age=0.5,begin.time=1,age.unit=0.5)
> dp.ddl=make.design.data(dp)
> dp.ddl$Phi
   par.index model.index group cohort age time occ.cohort Cohort Age Time
1          1           1     1      1 0.5    1          1      0 0.5    0
2          2           2     1      1   1    2          1      0 1.0    1
3          3           3     1      1 1.5    3          1      0 1.5    2
4          4           4     1      1   2    4          1      0 2.0    3
5          5           5     1      1 2.5    5          1      0 2.5    4
6          6           6     1      1   3    6          1      0 3.0    5
7          7           7     1      2 0.5    2          2      1 0.5    1
8          8           8     1      2   1    3          2      1 1.0    2
9          9           9     1      2 1.5    4          2      1 1.5    3
10        10          10     1      2   2    5          2      1 2.0    4
11        11          11     1      2 2.5    6          2      1 2.5    5
12        12          12     1      3 0.5    3          3      2 0.5    2
13        13          13     1      3   1    4          3      2 1.0    3
14        14          14     1      3 1.5    5          3      2 1.5    4
15        15          15     1      3   2    6          3      2 2.0    5
16        16          16     1      4 0.5    4          4      3 0.5    3
17        17          17     1      4   1    5          4      3 1.0    4
18        18          18     1      4 1.5    6          4      3 1.5    5
19        19          19     1      5 0.5    5          5      4 0.5    4
20        20          20     1      5   1    6          5      4 1.0    5
21        21          21     1      6 0.5    6          6      5 0.5    5
> dp.ddl$p
   par.index model.index group cohort age time occ.cohort Cohort Age Time
1          1          22     1      1   1    2          1      0 1.0    0
2          2          23     1      1 1.5    3          1      0 1.5    1
3          3          24     1      1   2    4          1      0 2.0    2
4          4          25     1      1 2.5    5          1      0 2.5    3
5          5          26     1      1   3    6          1      0 3.0    4
6          6          27     1      1 3.5    7          1      0 3.5    5
7          7          28     1      2   1    3          2      1 1.0    1
8          8          29     1      2 1.5    4          2      1 1.5    2
9          9          30     1      2   2    5          2      1 2.0    3
10        10          31     1      2 2.5    6          2      1 2.5    4
11        11          32     1      2   3    7          2      1 3.0    5
12        12          33     1      3   1    4          3      2 1.0    2
13        13          34     1      3 1.5    5          3      2 1.5    3
14        14          35     1      3   2    6          3      2 2.0    4
15        15          36     1      3 2.5    7          3      2 2.5    5
16        16          37     1      4   1    5          4      3 1.0    3
17        17          38     1      4 1.5    6          4      3 1.5    4
18        18          39     1      4   2    7          4      3 2.0    5
19        19          40     1      5   1    6          5      4 1.0    4
20        20          41     1      5 1.5    7          5      4 1.5    5
21        21          42     1      6   1    7          6      5 1.0    5
>

--jeff

Re: Problem defining initial.age and age.unit

PostPosted: Tue Mar 19, 2013 12:12 pm
by Lconcannon
Thanks, Jeff, this is really helpful.
Cheers
Lianne