You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an issue when I try to build a Burnham model with LD data.
(Please note that the registration on the Phidot forum are closed, hence why I posted my issue here. Feel free to move it to the appropriate place)
When I build the ddl object, there seems to miss every other year in the Cohort/Year colums. This issue follows when building models and cause the PIMS matrices to have an extra parameters for the cohort missing.
See below a reproducible example with a subset of my data :
library(RMark)
#> This is RMark 2.2.7#> Documentation available at http://www.phidot.org/software/mark/rmark/RMarkDocumentation.zip# Here is a subset of the first 10 years of the data# The data have the format LDLDLD where L = capture/alive encounter# and D = dead encounter. The column freq is this capture history# frequency in the datasetdata<-tibble::tribble(
~ch, ~freq,
"11000000000000000000", 1L,
"10000000010000000000", 1L,
"10000000000000000000", 3L,
"00100000000100000000", 1L,
"00100000000000000100", 1L,
"00100000000000000000", 3L,
"00001000000000000000", 14L,
"00000010000100000000", 1L,
"00000010000000000100", 1L,
"00000010000000000000", 8L,
"00000000100001000000", 2L,
"00000000100000010000", 1L,
"00000000100000000100", 1L,
"00000000100000000000", 13L,
"00000000001000010000", 1L,
"00000000001000000000", 10L,
"00000000000011000000", 2L,
"00000000000010010000", 1L,
"00000000000010000100", 1L,
"00000000000010000000", 17L,
"00000000000000101000", 1L,
"00000000000000100100", 1L,
"00000000000000100000", 13L,
"00000000000000001000", 16L,
"00000000000000000011", 2L,
"00000000000000000010", 16L
)
# Process data into a Burnham life-dead modeldata.proc<- process.data(
data=data,
model="Burnham",
begin.time=1960
)
# Create design data listdata.ddl<- make.design.data(data.proc,
remove.unused=T
)
# Where chekcing the desing data list, we notice that half# the years are missing from the table. Upon running the model,# this create a problem in the PIMS matrix
unique(data.ddl$S$Cohort)
#> [1] 0 2 4 6 8data.ddl$S#> par.index model.index group cohort age time occ.cohort Cohort Age Time#> 1 1 1 1 1960 0 1960 1 0 0 0#> 2 2 2 1 1960 1 1961 1 0 1 1#> 3 3 3 1 1960 2 1962 1 0 2 2#> 4 4 4 1 1960 3 1963 1 0 3 3#> 5 5 5 1 1960 4 1964 1 0 4 4#> 6 6 6 1 1960 5 1965 1 0 5 5#> 7 7 7 1 1960 6 1966 1 0 6 6#> 8 8 8 1 1960 7 1967 1 0 7 7#> 9 9 9 1 1960 8 1968 1 0 8 8#> 10 10 10 1 1960 9 1969 1 0 9 9#> 20 20 20 1 1962 0 1962 3 2 0 2#> 21 21 21 1 1962 1 1963 3 2 1 3#> 22 22 22 1 1962 2 1964 3 2 2 4#> 23 23 23 1 1962 3 1965 3 2 3 5#> 24 24 24 1 1962 4 1966 3 2 4 6#> 25 25 25 1 1962 5 1967 3 2 5 7#> 26 26 26 1 1962 6 1968 3 2 6 8#> 27 27 27 1 1962 7 1969 3 2 7 9#> 35 35 35 1 1964 0 1964 5 4 0 4#> 36 36 36 1 1964 1 1965 5 4 1 5#> 37 37 37 1 1964 2 1966 5 4 2 6#> 38 38 38 1 1964 3 1967 5 4 3 7#> 39 39 39 1 1964 4 1968 5 4 4 8#> 40 40 40 1 1964 5 1969 5 4 5 9#> 46 46 46 1 1966 0 1966 7 6 0 6#> 47 47 47 1 1966 1 1967 7 6 1 7#> 48 48 48 1 1966 2 1968 7 6 2 8#> 49 49 49 1 1966 3 1969 7 6 3 9#> 53 53 53 1 1968 0 1968 9 8 0 8#> 54 54 54 1 1968 1 1969 9 8 1 9
Hi!
I have an issue when I try to build a Burnham model with LD data.
(Please note that the registration on the Phidot forum are closed, hence why I posted my issue here. Feel free to move it to the appropriate place)
When I build the ddl object, there seems to miss every other year in the Cohort/Year colums. This issue follows when building models and cause the PIMS matrices to have an extra parameters for the cohort missing.
See below a reproducible example with a subset of my data :
Created on 2021-01-28 by the reprex package (v1.0.0)
Session info
The text was updated successfully, but these errors were encountered: