library(marked)
The data set in this project is from the Oregon Department of Fish and Wildlife. It is observations on a population of North Western Pond Turtles located in one specific pond in The Dalles, Oregon. The data set contains 445 observations on 18 variables.
library(readr)
turtle_data <- read_csv("~/Documents/Math 248/Final Project Data/turtle data.csv")
turtle_data <- read_csv("turtle data.csv")
head(turtle_data)
## # A tibble: 6 × 18
## ID Event_Year PIT_Tag Scute…¹ Event…² Event…³ Pond_…⁴ Sex Annuli Carap…⁵
## <dbl> <dbl> <chr> <chr> <chr> <chr> <chr> <chr> <dbl> <dbl>
## 1 11 2020 3D9.1A8… GJ Recapt… 6/19/2… G F 9 43
## 2 12 2020 3D6.153… GHV Mark 6/19/2… G F 6 40
## 3 13 2020 3D6.153… <NA> Recapt… 6/19/2… G <NA> -9999 NA
## 4 14 2020 3D9.1A8… GIR Recapt… 6/19/2… G M 11 45
## 5 15 2020 3D9.1A8… <NA> Recapt… 6/19/2… G F 6 35
## 6 16 2020 3D9.1A8… G Recapt… 6/19/2… G F -9999 65
## # … with 8 more variables: Carapace_Length <dbl>, Carapace_Width <dbl>,
## # Plastron_Width <dbl>, Plastron_Length <dbl>, Weight <dbl>,
## # Photo_Notes <chr>, Text_Comments <chr>, PhotoPath <chr>, and abbreviated
## # variable names ¹Scute_Mark, ²Event_Type, ³Event_Date, ⁴Pond_Site,
## # ⁵Carapace_Height
The data were collected over a time period of 2018 to 2023 with data being collected during trapping events each summer where trapped turtles were marked (for first time captures) or labelled as a recapture (if they had already been captured previously). Various observations were recorded on them at each capture. There are repeat observations of the turtles in the data set because in this data set there were 57 capture events and any turtle alive and in the pond had a (presumably) equal chance of being captured at each of these times. In total there are 74 turtles in this data set that are represented over the 445 observations.
The variables of interest in this data set are the variable PIT_Tag which is a unique microchip type of mark used to identify turtles that are recaptured over the course of this study. The variables Event_Year and Event_Date tell the year and the data of the capture. The variable Sex tells us the sex of the turtle. The variable Annuli is a count of the growth rings on the turtle’s shell and can be a quick way to get an age estimate for the turtle. The value -9999 in this variable means the rings are too worn out to tell the age of the turtle, which is common. Lastly, the variables Carapace_Height, Carapace_Width, Carapace_Length, Plastron_Length, Plastron_Width, and Weight are all measures of size for these turtles. The Carapace is the top or domed part of the turtle’s shell and the plastron is the part of the shell on the underside of the turtle. Measurements of the carapace and plastron are in millimeters and measurements of the weight are in grams.
Looking at this data set, an interesting idea that comes up is
modeling survival of turtles in the population over the years and seeing
if there might be differential survival based on the sex or size of the
turtles. So the research question is this:
does survival differ in North Western Pond Turtle populations based on sex of the individuals or size of the individuals?
In order to answer this question using available modeling methods the data had to be reformatted. For the model, there must be a variable of capture history for each turtle and other variables on the turtles must be categorical. Each observation in the data set was a record of a capture, however in order to model the data we needed capture histories. So the data set was reformatted so that for each turtle, identified by their Pit Tag ID, there was a capture history over the 6 years of sampling represented by a string of six 0’s and 1’s (0 indicating a failure to capture and 1 a success). The variable of sex in this data set, which was desired to be used as a variable to differentiate survival, has the categories of female, male, and also unknown because in young turtles it can be nearly impossible to determine their sex. In order to differentiate turtles based on size, a new variable of size class was created based on the variable of plastron length, which is the most standard measure of size in turtles. There are 7 size classes in this variable, labeled as 0-6. The size class of 0 was used to identify unknown size, and classes 1-6 are based on measurements of plastron length in the data set with 1 being the smallest and 6 the largest size class. The turtles were repeatedly measured over 6 years so size class did vary by year as the turtles grew. However, only 23 of the 74 turtles changed in size class over the 6 years and only 1 was found to change by more than one size class over the 6 years. So for simplicity of the analysis and so turtles could be put into one size class for their capture history, the average of the measurements over the years was used to determine size class. Using these two categorical variables and the capture history allows for a model to be built that can answer the research question.
library(readr)
Turtles_ch_by_Year <- read_csv("~/Documents/Math 248/Final Project Data/Turtles ch by Year.csv",
col_types = cols(Sex = col_factor(levels = c("M",
"F", "U")), `Size Class` = col_factor(levels = c("0",
"1", "2", "3", "4", "5", "6"))))
head(Turtles_ch_by_Year)
## # A tibble: 6 × 4
## `Pit_Tag ID` ch Sex `Size Class`
## <chr> <chr> <fct> <fct>
## 1 3D6.1533C20DF9 000100 F 4
## 2 3D6.1533C20F2D 001110 F 3
## 3 3D6.1533C21139 000111 U 3
## 4 3D6.1533D49FB3 001000 F 4
## 5 3D6.1533D49FD6 000010 U 2
## 6 3D6.1533D4A0A8 000111 M 5
Mark-recapture methods are a broadly used method of ecological data collection and statistics. Individuals in a population are sampled, by trapping, over multiple capture periods (it must be at least 3). Individuals are marked and released at each capture and individuals who have been previously captured are labelled as a recapture and released. Population size can be estimated using the proportion marked, which is a fairly straightforward calculation using the proportion of those marked initially that are recaptured. The other thing that can be estimated is apparent survival. To estimate apparent survival the number recaptured is added to the number still present but not recaptured, and this sum is divided by the number initially marked. Survival in this model is ‘apparent’ or local because emigration from the area or population cannot be distinguished from death in this calculation. The number of animals still present but not recaptured is a parameter that must be estimated by the model based on data in the data set indicating a failure to capture when the animal is still present (for example, a miss and then a capture indicates they were still alive at the previous capture but failed to be captured).
The specific model used in this analysis is the Cormack Jolly Seber Model. This is a model that can be used to estimate apparent survival and probability of detection for mark recapture data. This model estimates two parameters: \(\phi\) or probability of survival to the next capture event, and \(p\), which is probability of detection or likelihood that if an animal is present it will be captured in the sample. There are many models that can estimate \(\phi\) and \(p\) for mark recapture data sets, however the Cormack Jolly Seber Model was chosen because in addition to analyzing other categorical variables it can also give year specific estimations of \(\phi\) and \(p\) allowing for another variable, which is time, to be analyzed while looking at the data. In this model, the known constant is the number of animals released each year. The parameters are \(\phi\), \(p\), and \(\chi\) (\(\chi\) is the probability that an animal is present but not detected during a capture event and is the compliment of \(p\)). This model is built using a few different parts. A maximum likelihood estimation, which is a method of estimating the parameters of an assumed probability distribution is used with two sub-models. The sub-models are general linear models that use multinomial logistic regression to model \(\phi\) and \(p\), separately (one in each model). Using the general linear models, the maximum likelihood estimation finds the most likely parameters that give the observed frequency of capture history (assuming a probability distribution of the capture histories). The general linear models use a multinomial distribution because the categorical variables used to model \(\phi\) and \(p\) can have more than two categories. The models are logistic regression models because the parameters \(\phi\) and \(p\) are probabilities. The theoretical sub-model then looks something like this for \(\phi\): \[logit(\phi)=\beta_0+\beta_1x_1+\beta_2x_2+..+\beta_nx_n\] and something like this for \(p\): \[logit(p)=\beta_0+\beta_1x_1+\beta_2x_2+..+\beta_nx_n\] The \(x_i\) here represent different variables that are used to predict the parameters of \(\phi\) and \(p\), for example time, sex, size class or any combination of these (including interaction terms). The \(\beta_i\) represent coefficients used for each respective predictor to model the parameters. After the general linear models are built using the desired combination of predictors, the maximum likelihood estimation is used to estimate values for \(\phi\) and \(p\) from each model based on the frequency of capture histories. The Akaike Information Criterion, or AIC which determines the best fitting model using the maximum likelihood criterion, is also calculated for each model and can be used to compare to models with other combinations of predictors. Ultimately this gives the ‘best model’ for the data based on the maximum likelihood estimation and subsequent AIC. The \(\phi\) and \(p\) predictions used from this model are the output of the modeling process. So for our analysis we will use the predictors time, size class, and sex, and look at models that compare different combinations of them, and the AIC these models produce, using R.
This model uses two general linear models and therefore has the assumptions of normality, independence and equal variance. The condition of independence is met in this study because each capture event is a random sample with equal probabilities of capture for each turtle at each time of sample. There are also additional assumptions for this model that come with the mark recapture statistical format. For this model to be valid, every animal present must have the same probability of capture, which is a fairly reasonable assumption because it does not seem likely that different turtles would have different probabilities of capture in this data set. A potential issue with this assumption, however, could be smaller turtles having an easier time escaping from the trap, which could possibly give the smaller turtles a lower probability of capture. Another assumption that must be valid for this model to work is that marks are not lost between sampling events or misread. This assumption is well met for this study because the marks are applied in the form of a subcutaneous pit tag, or microchip. The likelihood of these coming out of the turtle is very small if properly injected into the turtle. The marks are read using an electronic pit tag reader, so the likelihood of marks being misread is very small. For this model to be valid there is the assumption that emigration from the sampling area is permanent, although in this data set due to the physiology of the turtles and the constraint of living in a pond that is fairly isolated, it is not likely that emigration is really a factor at all in this model. Another assumption that is important to this model is that marking the animal does not influence survival of the animal. This assumption is fairly reasonable for this model as well, as the microchips are minimally invasive in the turtles and as long as they are injected properly should not affect the turtles chance of survival. The last assumption that is important to this model is that the sampling area is constant, which is satisfied for this data set because the same pond was sampled each year with the same method of using a lobster trap and therefore the sampling area does not change between sample events. We can see that the data seems to satisfy all model conditions fairly well, so the model should be valid to assess the data.
We can start by building a model that simply estimates survival and probability of detection assuming that they do not vary by year, and using no extra predictor variables.
cjs.modelforYear1 <- crm(Turtles_ch_by_Year)
cjs.modelforYear1 <- cjs.hessian(cjs.modelforYear1)
predict(cjs.modelforYear1,
newdata = data.frame(Sex = c("F", "M", "U")),
se = TRUE)
## $Phi
## occ estimate se lcl ucl
## 1 1 0.9078948 0.02587219 0.8431405 0.9475794
##
## $p
## occ estimate se lcl ucl
## 1 2 0.6908612 0.03831341 0.6112424 0.7605614
We can see, using the predict function, that this gives us an estimate for \(\phi\) of about 0.91 with a confidence interval of 0.84 to 0.95. Then for the parameter of \(p\), we see that the estimate is about 0.69, and the confidence interval is 0.61 to 0.76 for this parameter.
If we want to model \(\phi\) and \(p\) using our predictor variables of time, sex, and size we can create a full set of models for each of the combinations sex and time, and size class and time, and use the AIC to determine the best fit for this data set. Looking first at the variable sex, and the models made allowing \(\phi\) and \(p\) to vary based on sex and time.
Turtles_ch_by_Year=data.frame(Turtles_ch_by_Year)
is.factor(Turtles_ch_by_Year[, "Sex"])
## [1] TRUE
turtleyear.proc <- process.data(Turtles_ch_by_Year,
group = "Sex") # group variable has to be in the data
# Make design data (from processed data)
turtleyear.ddl <- make.design.data(turtleyear.proc)
fit.turtleyear.cjs.models <- function(){
# Apparent survival (Phi) formula
Phi.sex.time <- list(formula=~Sex*time) # Just like in other linear models "*" includes main effects and an interaction
Phi.time <- list(formula=~time) # differs between discrete times
Phi.sex <- list(formula=~Sex) # differs between males and females
Phi.dot <- list(formula=~1) # constant survival
# Detection probability (p) formula
p.sex <- list(formula=~Sex) # differs between males and females
p.time <- list(formula=~time) # one discrete estimate of p per capture event
p.dot <- list(formula=~1) # constant detection
# Construct all combinations and put into one model table
cml <- create.model.list(c("Phi","p")) # makes all possible combinations of those parameter formulas
results <- crm.wrapper(cml,
data = turtleyear.proc,
ddl = turtleyear.ddl,
external = FALSE,
accumulate = FALSE,
hessian = TRUE)
return(results)
}
# Run function
turtleyear.cjs.models <- fit.turtleyear.cjs.models()
## Phi.dot.p.dot
## Phi.dot.p.sex
##
Number of evaluations: 100 -2lnl: 335.2946526
Number of evaluations: 200 -2lnl: 335.133569Phi.dot.p.time
##
Number of evaluations: 100 -2lnl: 288.4928446
Number of evaluations: 200 -2lnl: 288.5719367
Number of evaluations: 300 -2lnl: 288.5069659
Number of evaluations: 100 -2lnl: 289.8798007Phi.sex.p.dot
##
Number of evaluations: 100 -2lnl: 344.7225303
Number of evaluations: 200 -2lnl: 344.7172092Phi.sex.p.sex
##
Number of evaluations: 100 -2lnl: 334.9981108
Number of evaluations: 200 -2lnl: 334.9892506
Number of evaluations: 300 -2lnl: 334.9995187
Number of evaluations: 400 -2lnl: 334.9882948
Number of evaluations: 100 -2lnl: 335.9319903Phi.sex.p.time
##
Number of evaluations: 100 -2lnl: 287.9003326
Number of evaluations: 200 -2lnl: 286.8255162
Number of evaluations: 300 -2lnl: 286.8307886
Number of evaluations: 400 -2lnl: 286.9485109
Number of evaluations: 500 -2lnl: 286.8293594
Number of evaluations: 100 -2lnl: 287.320658
Number of evaluations: 200 -2lnl: 286.8506919Phi.sex.time.p.dot
##
Number of evaluations: 100 -2lnl: 368.8952721
Number of evaluations: 200 -2lnl: 333.3672554
Number of evaluations: 300 -2lnl: 328.215629
Number of evaluations: 400 -2lnl: 326.3432208
Number of evaluations: 500 -2lnl: 322.4954924
Number of evaluations: 600 -2lnl: 320.5876756
Number of evaluations: 700 -2lnl: 319.9244313
Number of evaluations: 800 -2lnl: 319.601423
Number of evaluations: 900 -2lnl: 319.5187652
Number of evaluations: 1000 -2lnl: 319.4368148
Number of evaluations: 1100 -2lnl: 319.3924541
Number of evaluations: 1200 -2lnl: 319.3853819
Number of evaluations: 1300 -2lnl: 319.3801863
Number of evaluations: 1400 -2lnl: 319.3786056
Number of evaluations: 1500 -2lnl: 319.3782307
Number of evaluations: 1600 -2lnl: 319.381011
Number of evaluations: 1700 -2lnl: 319.3756988
Number of evaluations: 1800 -2lnl: 319.3567858
Number of evaluations: 1900 -2lnl: 319.3447911
Number of evaluations: 2000 -2lnl: 319.3241419
Number of evaluations: 2100 -2lnl: 319.2717638
Number of evaluations: 2200 -2lnl: 319.2670523
Number of evaluations: 2300 -2lnl: 319.2657771
Number of evaluations: 2400 -2lnl: 319.2657458
Number of evaluations: 2500 -2lnl: 395.6305124
Number of evaluations: 2600 -2lnl: 322.2839454
Number of evaluations: 2700 -2lnl: 395.6063436
Number of evaluations: 2800 -2lnl: 322.2092422
Number of evaluations: 2900 -2lnl: 319.3161567
Number of evaluations: 3000 -2lnl: 319.268206
Number of evaluations: 3100 -2lnl: 395.6158111
Number of evaluations: 3200 -2lnl: 319.2659893
Number of evaluations: 3300 -2lnl: 319.7212837
Number of evaluations: 3400 -2lnl: 319.2898359
Number of evaluations: 3500 -2lnl: 319.2657464
Number of evaluations: 100 -2lnl: 319.320812
Number of evaluations: 200 -2lnl: 322.2700395
Number of evaluations: 300 -2lnl: 319.7744747
Number of evaluations: 400 -2lnl: 319.2708042
Number of evaluations: 500 -2lnl: 319.2657487
Number of evaluations: 600 -2lnl: 319.2657912
Number of evaluations: 700 -2lnl: 319.7898874
Number of evaluations: 800 -2lnl: 319.2708609
Number of evaluations: 900 -2lnl: 319.3963615
Number of evaluations: 1000 -2lnl: 319.2894107Phi.sex.time.p.sex
##
Number of evaluations: 100 -2lnl: 394.3769189
Number of evaluations: 200 -2lnl: 325.3933422
Number of evaluations: 300 -2lnl: 318.7906391
Number of evaluations: 400 -2lnl: 313.5874226
Number of evaluations: 500 -2lnl: 312.9453667
Number of evaluations: 600 -2lnl: 311.1968265
Number of evaluations: 700 -2lnl: 310.4120553
Number of evaluations: 800 -2lnl: 308.6064651
Number of evaluations: 900 -2lnl: 308.2972842
Number of evaluations: 1000 -2lnl: 308.2184178
Number of evaluations: 1100 -2lnl: 308.1271037
Number of evaluations: 1200 -2lnl: 308.100418
Number of evaluations: 1300 -2lnl: 308.0426816
Number of evaluations: 1400 -2lnl: 308.0265172
Number of evaluations: 1500 -2lnl: 308.0217106
Number of evaluations: 1600 -2lnl: 308.0200359
Number of evaluations: 1700 -2lnl: 308.0188971
Number of evaluations: 1800 -2lnl: 308.0186092
Number of evaluations: 1900 -2lnl: 308.01859
Number of evaluations: 2000 -2lnl: 308.028501
Number of evaluations: 2100 -2lnl: 308.4279891
Number of evaluations: 2200 -2lnl: 308.0185515
Number of evaluations: 2300 -2lnl: 308.0185483
Number of evaluations: 2400 -2lnl: 310.4599906
Number of evaluations: 2500 -2lnl: 308.1740878
Number of evaluations: 2600 -2lnl: 308.0185515
Number of evaluations: 2700 -2lnl: 308.0185515
Number of evaluations: 2800 -2lnl: 308.0186362
Number of evaluations: 2900 -2lnl: 308.0291223
Number of evaluations: 3000 -2lnl: 308.107881
Number of evaluations: 3100 -2lnl: 308.652566
Number of evaluations: 3200 -2lnl: 308.0346635
Number of evaluations: 3300 -2lnl: 309.9270508
Number of evaluations: 3400 -2lnl: 308.0185515
Number of evaluations: 100 -2lnl: 308.0185515
Number of evaluations: 200 -2lnl: 317.1203271
Number of evaluations: 300 -2lnl: 500.2968014
Number of evaluations: 400 -2lnl: 308.0185515
Number of evaluations: 500 -2lnl: 497.9279559
Number of evaluations: 600 -2lnl: 308.0188336
Number of evaluations: 700 -2lnl: 308.018552
Number of evaluations: 800 -2lnl: 308.0186361
Number of evaluations: 900 -2lnl: 308.030381
Number of evaluations: 1000 -2lnl: 308.1125979
Number of evaluations: 1100 -2lnl: 309.571625
Number of evaluations: 1200 -2lnl: 308.0428627
Number of evaluations: 1300 -2lnl: 308.2079233Phi.sex.time.p.time
##
Number of evaluations: 100 -2lnl: 332.0742511
Number of evaluations: 200 -2lnl: 321.3553652
Number of evaluations: 300 -2lnl: 303.4489707
Number of evaluations: 400 -2lnl: 297.8560383
Number of evaluations: 500 -2lnl: 295.9647634
Number of evaluations: 600 -2lnl: 294.1652506
Number of evaluations: 700 -2lnl: 293.0245101
Number of evaluations: 800 -2lnl: 291.6299326
Number of evaluations: 900 -2lnl: 289.3997896
Number of evaluations: 1000 -2lnl: 283.9618299
Number of evaluations: 1100 -2lnl: 281.4420362
Number of evaluations: 1200 -2lnl: 280.1740576
Number of evaluations: 1300 -2lnl: 278.3591928
Number of evaluations: 1400 -2lnl: 278.1797778
Number of evaluations: 1500 -2lnl: 278.0627358
Number of evaluations: 1600 -2lnl: 277.902148
Number of evaluations: 1700 -2lnl: 277.7748399
Number of evaluations: 1800 -2lnl: 277.7389746
Number of evaluations: 1900 -2lnl: 277.7218668
Number of evaluations: 2000 -2lnl: 277.7169002
Number of evaluations: 2100 -2lnl: 277.7151028
Number of evaluations: 2200 -2lnl: 277.6970918
Number of evaluations: 2300 -2lnl: 277.6944014
Number of evaluations: 2400 -2lnl: 277.6887525
Number of evaluations: 2500 -2lnl: 277.678633
Number of evaluations: 2600 -2lnl: 277.6398973
Number of evaluations: 2700 -2lnl: 277.6226743
Number of evaluations: 2800 -2lnl: 277.5990037
Number of evaluations: 2900 -2lnl: 277.280547
Number of evaluations: 3000 -2lnl: 277.1137549
Number of evaluations: 3100 -2lnl: 276.5414559
Number of evaluations: 3200 -2lnl: 276.1998394
Number of evaluations: 3300 -2lnl: 276.0088172
Number of evaluations: 3400 -2lnl: 276.0050212
Number of evaluations: 3500 -2lnl: 275.9910301
Number of evaluations: 3600 -2lnl: 275.9838614
Number of evaluations: 3700 -2lnl: 275.9816419
Number of evaluations: 3800 -2lnl: 275.9811525
Number of evaluations: 3900 -2lnl: 275.9809936
Number of evaluations: 4000 -2lnl: 275.9809433
Number of evaluations: 4100 -2lnl: 275.9808079
Number of evaluations: 4200 -2lnl: 275.9804684
Number of evaluations: 4300 -2lnl: 275.9804026
Number of evaluations: 4400 -2lnl: 275.9803976
Number of evaluations: 4500 -2lnl: 279.1599594
Number of evaluations: 4600 -2lnl: 276.794261
Number of evaluations: 4700 -2lnl: 278.1715283
Number of evaluations: 4800 -2lnl: 276.6351211
Number of evaluations: 4900 -2lnl: 275.9804033
Number of evaluations: 5000 -2lnl: 275.9874186
Number of evaluations: 5100 -2lnl: 278.1715181
Number of evaluations: 5200 -2lnl: 275.9827337
Number of evaluations: 5300 -2lnl: 284.6913294
Number of evaluations: 5400 -2lnl: 275.987061
Number of evaluations: 5500 -2lnl: 276.0723753
Number of evaluations: 5600 -2lnl: 276.147795
Number of evaluations: 5700 -2lnl: 278.3884981
Number of evaluations: 5800 -2lnl: 275.9890482
Number of evaluations: 5900 -2lnl: 276.0226039
Number of evaluations: 6000 -2lnl: 275.980398
Number of evaluations: 6100 -2lnl: 275.9803977
Number of evaluations: 100 -2lnl: 276.1473694
Number of evaluations: 200 -2lnl: 276.2710396
Number of evaluations: 300 -2lnl: 303.7464798
Number of evaluations: 400 -2lnl: 276.2034988
Number of evaluations: 500 -2lnl: 313.9336039
Number of evaluations: 600 -2lnl: 276.6298499
Number of evaluations: 700 -2lnl: 280.2084905
Number of evaluations: 800 -2lnl: 276.2034967
Number of evaluations: 900 -2lnl: 303.7155375
Number of evaluations: 1000 -2lnl: 278.3672947
Number of evaluations: 1100 -2lnl: 276.5906778
Number of evaluations: 1200 -2lnl: 276.638501
Number of evaluations: 1300 -2lnl: 300.2910166
Number of evaluations: 1400 -2lnl: 276.2485206
Number of evaluations: 1500 -2lnl: 300.0198227
Number of evaluations: 1600 -2lnl: 275.9909356Phi.time.p.dot
##
Number of evaluations: 100 -2lnl: 328.1211836
Number of evaluations: 200 -2lnl: 327.9536487
Number of evaluations: 300 -2lnl: 327.9520842
Number of evaluations: 400 -2lnl: 328.0779905
Number of evaluations: 500 -2lnl: 328.0092068
Number of evaluations: 100 -2lnl: 328.8707532Phi.time.p.sex
##
Number of evaluations: 100 -2lnl: 316.1505671
Number of evaluations: 200 -2lnl: 315.5460211
Number of evaluations: 300 -2lnl: 315.4992417
Number of evaluations: 400 -2lnl: 315.5089769
Number of evaluations: 500 -2lnl: 315.526226
Number of evaluations: 600 -2lnl: 315.6378865
Number of evaluations: 100 -2lnl: 315.5197748
Number of evaluations: 200 -2lnl: 315.5232643Phi.time.p.time
##
Number of evaluations: 100 -2lnl: 289.7513395
Number of evaluations: 200 -2lnl: 287.4244863
Number of evaluations: 300 -2lnl: 287.3939316
Number of evaluations: 400 -2lnl: 287.3927102
Number of evaluations: 500 -2lnl: 287.3960439
Number of evaluations: 600 -2lnl: 287.3983316
Number of evaluations: 700 -2lnl: 287.5031142
Number of evaluations: 800 -2lnl: 287.4014141
Number of evaluations: 100 -2lnl: 287.3941122
Number of evaluations: 200 -2lnl: 287.4213531
Number of evaluations: 300 -2lnl: 288.2963032
Number of evaluations: 400 -2lnl: 287.4063754
turtleyear.cjs.models
## model npar AIC DeltaAIC weight neg2lnl
## 3 Phi(~1)p(~time) 6 300.4901 0.000000 7.444782e-01 288.4901
## 6 Phi(~Sex)p(~time) 8 302.8254 2.335373 2.315965e-01 286.8254
## 12 Phi(~time)p(~time) 10 307.3927 6.902625 2.360293e-02 287.3927
## 9 Phi(~Sex * time)p(~time) 20 315.9804 15.490332 3.222323e-04 275.9804
## 11 Phi(~time)p(~Sex) 8 331.4992 31.009176 1.374975e-07 315.4992
## 10 Phi(~time)p(~1) 6 339.9493 39.459280 2.010843e-09 327.9493
## 2 Phi(~1)p(~Sex) 4 343.1336 42.643504 4.091974e-10 335.1336
## 8 Phi(~Sex * time)p(~Sex) 18 344.0186 43.528486 2.628823e-10 308.0186
## 5 Phi(~Sex)p(~Sex) 6 346.9883 46.498229 5.955110e-11 334.9883
## 1 Phi(~1)p(~1) 2 350.8048 50.314707 8.833893e-12 346.8048
## 7 Phi(~Sex * time)p(~1) 16 351.2657 50.775680 7.015410e-12 319.2657
## 4 Phi(~Sex)p(~1) 4 352.7172 52.227144 3.395250e-12 344.7172
## convergence
## 3 0
## 6 0
## 12 0
## 9 0
## 11 0
## 10 0
## 2 0
## 8 0
## 5 0
## 1 0
## 7 0
## 4 0
We can then use the AIC to determine the best model for this data, and we see that the best model corresponds to the lowest AIC. Looking at the table we see this model is the model using a constant estimate for \(\phi\), and year specific estimates for \(p\). This tells us that survival and detection do not vary enough by sex to be worth including sex in the model based on the AIC. We see however that the probability of detection, \(p\), does vary by year significantly enough to be worth including in the model.
We can then do this same analysis looking at size class:
turtleyear1.proc <- process.data(Turtles_ch_by_Year,
group = "Size.Class") # group variable has to be in the data
# Make design data (from processed data)
turtleyear1.ddl <- make.design.data(turtleyear1.proc)
fit.turtleyear1.cjs.models <- function(){
# Apparent survival (Phi) formula
Phi.sizeclass.time <- list(formula=~Size.Class*time) # Just like in other linear models "*" includes main effects and an interaction
Phi.time <- list(formula=~time) # differs between discrete times
Phi.size <- list(formula=~Size.Class) # differs between males and females
Phi.dot <- list(formula=~1) # constant survival
# Detection probability (p) formula
p.size <- list(formula=~Size.Class) # differs between males and females
p.time <- list(formula=~time) # one discrete estimate of p per capture event
p.dot <- list(formula=~1) # constant detection
# Construct all combinations and put into one model table
cml <- create.model.list(c("Phi","p")) # makes all possible combinations of those parameter formulas
results <- crm.wrapper(cml,
data = turtleyear1.proc,
ddl = turtleyear1.ddl,
external = FALSE,
accumulate = FALSE,
hessian = TRUE)
return(results)
}
# Run function
turtleyear1.cjs.models <- fit.turtleyear1.cjs.models()
## Phi.dot.p.dot
## Phi.dot.p.size
##
Number of evaluations: 100 -2lnl: 334.5543842
Number of evaluations: 200 -2lnl: 326.4100601
Number of evaluations: 300 -2lnl: 325.7545926
Number of evaluations: 400 -2lnl: 325.7545251
Number of evaluations: 500 -2lnl: 325.7528479
Number of evaluations: 600 -2lnl: 325.7458746
Number of evaluations: 700 -2lnl: 325.7540973
Number of evaluations: 800 -2lnl: 328.8655797
Number of evaluations: 900 -2lnl: 325.7936649
Number of evaluations: 1000 -2lnl: 325.7458491
Number of evaluations: 100 -2lnl: 408.8477799
Number of evaluations: 200 -2lnl: 329.1797848Phi.dot.p.time
##
Number of evaluations: 100 -2lnl: 288.4928446
Number of evaluations: 200 -2lnl: 288.5719367
Number of evaluations: 300 -2lnl: 288.5069659
Number of evaluations: 100 -2lnl: 289.8798007Phi.size.p.dot
##
Number of evaluations: 100 -2lnl: 340.1481056
Number of evaluations: 200 -2lnl: 333.8575093
Number of evaluations: 300 -2lnl: 333.5543865
Number of evaluations: 400 -2lnl: 333.5521679
Number of evaluations: 500 -2lnl: 333.5402979
Number of evaluations: 600 -2lnl: 333.5224958
Number of evaluations: 700 -2lnl: 334.0808713
Number of evaluations: 800 -2lnl: 334.2658569
Number of evaluations: 900 -2lnl: 341.0416699
Number of evaluations: 1000 -2lnl: 333.5224423
Number of evaluations: 100 -2lnl: 340.5859927
Number of evaluations: 200 -2lnl: 333.5506454Phi.size.p.size
##
Number of evaluations: 100 -2lnl: 345.0604601
Number of evaluations: 200 -2lnl: 329.1863777
Number of evaluations: 300 -2lnl: 325.2646057
Number of evaluations: 400 -2lnl: 323.9413337
Number of evaluations: 500 -2lnl: 323.7252253
Number of evaluations: 600 -2lnl: 323.6489395
Number of evaluations: 700 -2lnl: 323.6270731
Number of evaluations: 800 -2lnl: 323.6266273
Number of evaluations: 900 -2lnl: 323.6262694
Number of evaluations: 1000 -2lnl: 323.6261355
Number of evaluations: 1100 -2lnl: 323.625975
Number of evaluations: 1200 -2lnl: 323.6257144
Number of evaluations: 1300 -2lnl: 324.1602182
Number of evaluations: 1400 -2lnl: 323.8701402
Number of evaluations: 1500 -2lnl: 325.0787864
Number of evaluations: 1600 -2lnl: 323.62504
Number of evaluations: 1700 -2lnl: 324.1602182
Number of evaluations: 1800 -2lnl: 331.5334049
Number of evaluations: 1900 -2lnl: 323.7096287
Number of evaluations: 2000 -2lnl: 324.3000986
Number of evaluations: 2100 -2lnl: 323.6257096
Number of evaluations: 100 -2lnl: 331.7151044
Number of evaluations: 200 -2lnl: 323.6917175
Number of evaluations: 300 -2lnl: 431.7368896
Number of evaluations: 400 -2lnl: 329.6463852
Number of evaluations: 500 -2lnl: 372.5218817
Number of evaluations: 600 -2lnl: 325.9038097
Number of evaluations: 700 -2lnl: 457.0661437
Number of evaluations: 800 -2lnl: 330.1070452Phi.size.p.time
##
Number of evaluations: 100 -2lnl: 307.251317
Number of evaluations: 200 -2lnl: 283.6029894
Number of evaluations: 300 -2lnl: 279.7101732
Number of evaluations: 400 -2lnl: 276.3620376
Number of evaluations: 500 -2lnl: 276.2886447
Number of evaluations: 600 -2lnl: 276.2622166
Number of evaluations: 700 -2lnl: 276.5766653
Number of evaluations: 800 -2lnl: 276.3185638
Number of evaluations: 900 -2lnl: 277.3599131
Number of evaluations: 1000 -2lnl: 276.2658512
Number of evaluations: 1100 -2lnl: 276.4862503
Number of evaluations: 1200 -2lnl: 276.2726855
Number of evaluations: 1300 -2lnl: 276.260374
Number of evaluations: 100 -2lnl: 282.7445392
Number of evaluations: 200 -2lnl: 276.555485
Number of evaluations: 300 -2lnl: 278.521361
Number of evaluations: 400 -2lnl: 276.2904727
Number of evaluations: 500 -2lnl: 277.8480992
Number of evaluations: 600 -2lnl: 276.3218376Phi.sizeclass.time.p.dot
##
Number of evaluations: 100 -2lnl: 390.4993465
Number of evaluations: 200 -2lnl: 363.9474483
Number of evaluations: 300 -2lnl: 328.4519879
Number of evaluations: 400 -2lnl: 321.7694828
Number of evaluations: 500 -2lnl: 318.8516731
Number of evaluations: 600 -2lnl: 306.4402207
Number of evaluations: 700 -2lnl: 304.9314255
Number of evaluations: 800 -2lnl: 299.7279621
Number of evaluations: 900 -2lnl: 297.8266094
Number of evaluations: 1000 -2lnl: 297.0243904
Number of evaluations: 1100 -2lnl: 294.8640944
Number of evaluations: 1200 -2lnl: 291.9469321
Number of evaluations: 1300 -2lnl: 291.3337436
Number of evaluations: 1400 -2lnl: 290.8210744
Number of evaluations: 1500 -2lnl: 290.6652774
Number of evaluations: 1600 -2lnl: 290.6107751
Number of evaluations: 1700 -2lnl: 290.5526151
Number of evaluations: 1800 -2lnl: 290.5406878
Number of evaluations: 1900 -2lnl: 290.5351813
Number of evaluations: 2000 -2lnl: 290.5303466
Number of evaluations: 2100 -2lnl: 290.5294991
Number of evaluations: 2200 -2lnl: 290.5290788
Number of evaluations: 2300 -2lnl: 290.5287384
Number of evaluations: 2400 -2lnl: 290.5286818
Number of evaluations: 2500 -2lnl: 290.5286437
Number of evaluations: 2600 -2lnl: 290.528631
Number of evaluations: 2700 -2lnl: 290.6278795
Number of evaluations: 2800 -2lnl: 328.1829682
Number of evaluations: 2900 -2lnl: 290.8701504
Number of evaluations: 3000 -2lnl: 317.6639357
Number of evaluations: 3100 -2lnl: 292.582618
Number of evaluations: 3200 -2lnl: 320.505567
Number of evaluations: 3300 -2lnl: 290.687531
Number of evaluations: 3400 -2lnl: 375.9744016
Number of evaluations: 3500 -2lnl: 291.9927066
Number of evaluations: 3600 -2lnl: 317.6639357
Number of evaluations: 3700 -2lnl: 291.2390313
Number of evaluations: 3800 -2lnl: 375.9744018
Number of evaluations: 3900 -2lnl: 290.5286274
Number of evaluations: 4000 -2lnl: 308.9296391
Number of evaluations: 4100 -2lnl: 290.687531
Number of evaluations: 4200 -2lnl: 355.3182765
Number of evaluations: 4300 -2lnl: 292.9667232
Number of evaluations: 4400 -2lnl: 290.5286274
Number of evaluations: 4500 -2lnl: 292.582618
Number of evaluations: 4600 -2lnl: 290.5286273
Number of evaluations: 4700 -2lnl: 290.5286274
Number of evaluations: 4800 -2lnl: 290.5286274
Number of evaluations: 4900 -2lnl: 290.5286274
Number of evaluations: 5000 -2lnl: 317.6639357
Number of evaluations: 5100 -2lnl: 290.5286274
Number of evaluations: 5200 -2lnl: 290.5286274
Number of evaluations: 5300 -2lnl: 292.9667232
Number of evaluations: 5400 -2lnl: 291.0469159
Number of evaluations: 5500 -2lnl: 290.5286274
Number of evaluations: 5600 -2lnl: 291.0469157
Number of evaluations: 5700 -2lnl: 290.5286274
Number of evaluations: 5800 -2lnl: 290.5286292
Number of evaluations: 5900 -2lnl: 292.9667235
Number of evaluations: 6000 -2lnl: 317.6639357
Number of evaluations: 6100 -2lnl: 290.5286273
Number of evaluations: 6200 -2lnl: 290.5286274
Number of evaluations: 6300 -2lnl: 290.5286274
Number of evaluations: 6400 -2lnl: 290.5286274
Number of evaluations: 6500 -2lnl: 290.8701504
Number of evaluations: 6600 -2lnl: 294.6048221
Number of evaluations: 6700 -2lnl: 292.7507042
Number of evaluations: 6800 -2lnl: 293.7450232
Number of evaluations: 6900 -2lnl: 290.6967136
Number of evaluations: 7000 -2lnl: 293.6296525
Number of evaluations: 7100 -2lnl: 290.7160683
Number of evaluations: 7200 -2lnl: 317.6639357
Number of evaluations: 7300 -2lnl: 290.5286274
Number of evaluations: 7400 -2lnl: 290.5286274
Number of evaluations: 7500 -2lnl: 290.687531
Number of evaluations: 7600 -2lnl: 290.5286274
Number of evaluations: 7700 -2lnl: 290.5286274
Number of evaluations: 7800 -2lnl: 309.4939169
Number of evaluations: 7900 -2lnl: 290.5553535
Number of evaluations: 8000 -2lnl: 290.5286298
Number of evaluations: 8100 -2lnl: 290.5286275
Number of evaluations: 100 -2lnl: 308.9296391
Number of evaluations: 200 -2lnl: 290.5286274
Number of evaluations: 300 -2lnl: 439.219714
Number of evaluations: 400 -2lnl: 291.3382835
Number of evaluations: 500 -2lnl: 292.8283905
Number of evaluations: 600 -2lnl: 296.5169118
Number of evaluations: 700 -2lnl: 298.1124541
Number of evaluations: 800 -2lnl: 290.687531
Number of evaluations: 900 -2lnl: 316.5249463
Number of evaluations: 1000 -2lnl: 290.9743457
Number of evaluations: 1100 -2lnl: 298.1124541
Number of evaluations: 1200 -2lnl: 290.6875311
Number of evaluations: 1300 -2lnl: 290.5286274
Number of evaluations: 1400 -2lnl: 296.5169117
Number of evaluations: 1500 -2lnl: 290.5286275
Number of evaluations: 1600 -2lnl: 293.4290553
Number of evaluations: 1700 -2lnl: 292.3101016
Number of evaluations: 1800 -2lnl: 290.5286274
Number of evaluations: 1900 -2lnl: 290.5286273
Number of evaluations: 2000 -2lnl: 291.2390313
Number of evaluations: 2100 -2lnl: 290.5286274
Number of evaluations: 2200 -2lnl: 290.5549819
Number of evaluations: 2300 -2lnl: 290.5286273
Number of evaluations: 2400 -2lnl: 290.9743457
Number of evaluations: 2500 -2lnl: 317.9767964
Number of evaluations: 2600 -2lnl: 291.2823027
Number of evaluations: 2700 -2lnl: 290.5286276
Number of evaluations: 2800 -2lnl: 290.5286274
Number of evaluations: 2900 -2lnl: 290.5286274
Number of evaluations: 3000 -2lnl: 290.5286274
Number of evaluations: 3100 -2lnl: 317.9768031
Number of evaluations: 3200 -2lnl: 291.282303
Number of evaluations: 3300 -2lnl: 290.5286294
Number of evaluations: 3400 -2lnl: 290.9743457
Number of evaluations: 3500 -2lnl: 290.5286273
Number of evaluations: 3600 -2lnl: 290.5549819
Number of evaluations: 3700 -2lnl: 290.5286273
Number of evaluations: 3800 -2lnl: 291.5805543
Number of evaluations: 3900 -2lnl: 294.6048221
Number of evaluations: 4000 -2lnl: 290.8701504
Number of evaluations: 4100 -2lnl: 293.7450232
Number of evaluations: 4200 -2lnl: 290.6967136
Number of evaluations: 4300 -2lnl: 295.4111268
Number of evaluations: 4400 -2lnl: 290.7160683
Number of evaluations: 4500 -2lnl: 297.7058473
Number of evaluations: 4600 -2lnl: 290.9743457
Number of evaluations: 4700 -2lnl: 290.5286274
Number of evaluations: 4800 -2lnl: 296.5169117
Number of evaluations: 4900 -2lnl: 290.5286275
Number of evaluations: 5000 -2lnl: 290.5286276
Number of evaluations: 5100 -2lnl: 290.9635045
Number of evaluations: 5200 -2lnl: 293.0072203
Number of evaluations: 5300 -2lnl: 294.5298677Phi.sizeclass.time.p.size
##
Number of evaluations: 100 -2lnl: 376.0531607
Number of evaluations: 200 -2lnl: 355.6386146
Number of evaluations: 300 -2lnl: 349.4220541
Number of evaluations: 400 -2lnl: 333.5775472
Number of evaluations: 500 -2lnl: 329.1274237
Number of evaluations: 600 -2lnl: 319.6370215
Number of evaluations: 700 -2lnl: 308.0763365
Number of evaluations: 800 -2lnl: 305.0037487
Number of evaluations: 900 -2lnl: 303.1525647
Number of evaluations: 1000 -2lnl: 297.5390961
Number of evaluations: 1100 -2lnl: 296.3425501
Number of evaluations: 1200 -2lnl: 294.5437497
Number of evaluations: 1300 -2lnl: 291.9881344
Number of evaluations: 1400 -2lnl: 290.8037615
Number of evaluations: 1500 -2lnl: 290.4226433
Number of evaluations: 1600 -2lnl: 289.4087075
Number of evaluations: 1700 -2lnl: 288.3892182
Number of evaluations: 1800 -2lnl: 287.6208874
Number of evaluations: 1900 -2lnl: 287.5436273
Number of evaluations: 2000 -2lnl: 287.414662
Number of evaluations: 2100 -2lnl: 287.2847627
Number of evaluations: 2200 -2lnl: 287.1843661
Number of evaluations: 2300 -2lnl: 287.119424
Number of evaluations: 2400 -2lnl: 287.0622216
Number of evaluations: 2500 -2lnl: 287.0465319
Number of evaluations: 2600 -2lnl: 287.0340502
Number of evaluations: 2700 -2lnl: 287.0269401
Number of evaluations: 2800 -2lnl: 287.0236298
Number of evaluations: 2900 -2lnl: 287.0215289
Number of evaluations: 3000 -2lnl: 287.0186872
Number of evaluations: 3100 -2lnl: 287.0180882
Number of evaluations: 3200 -2lnl: 287.0177869
Number of evaluations: 3300 -2lnl: 287.0175926
Number of evaluations: 3400 -2lnl: 287.0174643
Number of evaluations: 3500 -2lnl: 287.0173619
Number of evaluations: 3600 -2lnl: 287.017346
Number of evaluations: 3700 -2lnl: 287.0173323
Number of evaluations: 3800 -2lnl: 287.0173262
Number of evaluations: 3900 -2lnl: 287.0173231
Number of evaluations: 4000 -2lnl: 291.4106354
Number of evaluations: 4100 -2lnl: 294.4427602
Number of evaluations: 4200 -2lnl: 307.5562609
Number of evaluations: 4300 -2lnl: 300.1139871
Number of evaluations: 4400 -2lnl: 287.1886164
Number of evaluations: 4500 -2lnl: 300.0636867
Number of evaluations: 4600 -2lnl: 290.8042166
Number of evaluations: 4700 -2lnl: 287.017323
Number of evaluations: 4800 -2lnl: 290.8042166
Number of evaluations: 4900 -2lnl: 287.0173229
Number of evaluations: 5000 -2lnl: 290.8042166
Number of evaluations: 5100 -2lnl: 287.017323
Number of evaluations: 5200 -2lnl: 287.0173231
Number of evaluations: 5300 -2lnl: 300.0636867
Number of evaluations: 5400 -2lnl: 287.0173231
Number of evaluations: 5500 -2lnl: 293.7414156
Number of evaluations: 5600 -2lnl: 287.1886165
Number of evaluations: 5700 -2lnl: 293.7414156
Number of evaluations: 5800 -2lnl: 287.1718581
Number of evaluations: 5900 -2lnl: 298.0658436
Number of evaluations: 6000 -2lnl: 287.0173231
Number of evaluations: 6100 -2lnl: 288.5600081
Number of evaluations: 6200 -2lnl: 287.1718581
Number of evaluations: 6300 -2lnl: 287.0173231
Number of evaluations: 6400 -2lnl: 289.7259633
Number of evaluations: 6500 -2lnl: 287.0173229
Number of evaluations: 6600 -2lnl: 287.0173231
Number of evaluations: 6700 -2lnl: 287.0173231
Number of evaluations: 6800 -2lnl: 287.0173208
Number of evaluations: 6900 -2lnl: 287.0173191
Number of evaluations: 7000 -2lnl: 289.7259633
Number of evaluations: 7100 -2lnl: 287.0173229
Number of evaluations: 7200 -2lnl: 287.0173231
Number of evaluations: 7300 -2lnl: 287.0173231
Number of evaluations: 7400 -2lnl: 287.0173231
Number of evaluations: 7500 -2lnl: 288.5600081
Number of evaluations: 7600 -2lnl: 287.1718581
Number of evaluations: 7700 -2lnl: 310.4089715
Number of evaluations: 7800 -2lnl: 289.1927392
Number of evaluations: 7900 -2lnl: 299.3604509
Number of evaluations: 8000 -2lnl: 288.46516
Number of evaluations: 8100 -2lnl: 294.4427602
Number of evaluations: 8200 -2lnl: 287.5262056
Number of evaluations: 8300 -2lnl: 297.5211388
Number of evaluations: 8400 -2lnl: 289.5303283
Number of evaluations: 8500 -2lnl: 287.0173231
Number of evaluations: 8600 -2lnl: 287.0173231
Number of evaluations: 8700 -2lnl: 300.0636867
Number of evaluations: 8800 -2lnl: 287.0173231
Number of evaluations: 8900 -2lnl: 287.0173231
Number of evaluations: 9000 -2lnl: 351.9371581
Number of evaluations: 9100 -2lnl: 746.5476395
Number of evaluations: 9200 -2lnl: 357.9437882
Number of evaluations: 9300 -2lnl: 287.017323
Number of evaluations: 9400 -2lnl: 287.0173231
Number of evaluations: 9500 -2lnl: 287.0173231
Number of evaluations: 9600 -2lnl: 310.675984
Number of evaluations: 9700 -2lnl: 426.2576022
Number of evaluations: 9800 -2lnl: 388.8919255
Number of evaluations: 9900 -2lnl: 446.5446395
Number of evaluations: 10000 -2lnl: 311.0232253
Number of evaluations: 10100 -2lnl: 446.5446395
Number of evaluations: 10200 -2lnl: 311.6718376
Number of evaluations: 10300 -2lnl: 407.9734312
Number of evaluations: 10400 -2lnl: 384.1971068
Number of evaluations: 10500 -2lnl: 311.8921946
Number of evaluations: 10600 -2lnl: 290.7894798
Number of evaluations: 10700 -2lnl: 311.8921947
Number of evaluations: 10800 -2lnl: 289.7906189
Number of evaluations: 10900 -2lnl: 309.6868048
Number of evaluations: 11000 -2lnl: 291.2384558
Number of evaluations: 11100 -2lnl: 287.0173231
Number of evaluations: 11200 -2lnl: 287.017418
Number of evaluations: 11300 -2lnl: 287.0173238
Number of evaluations: 100 -2lnl: 287.0173231
Number of evaluations: 200 -2lnl: 287.0173231
Number of evaluations: 300 -2lnl: 558.0236708
Number of evaluations: 400 -2lnl: 296.5107384
Number of evaluations: 500 -2lnl: 290.6461213
Number of evaluations: 600 -2lnl: 297.4401493
Number of evaluations: 700 -2lnl: 462.9224381
Number of evaluations: 800 -2lnl: 310.5141071
Number of evaluations: 900 -2lnl: 444.2788895
Number of evaluations: 1000 -2lnl: 296.5107385
Number of evaluations: 1100 -2lnl: 444.2788895
Number of evaluations: 1200 -2lnl: 310.5141071
Number of evaluations: 1300 -2lnl: 342.2182565
Number of evaluations: 1400 -2lnl: 287.0173231
Number of evaluations: 1500 -2lnl: 287.0173231
Number of evaluations: 1600 -2lnl: 310.718338
Number of evaluations: 1700 -2lnl: 416.0081417
Number of evaluations: 1800 -2lnl: 287.0173231
Number of evaluations: 1900 -2lnl: 342.9763185
Number of evaluations: 2000 -2lnl: 287.8882916
Number of evaluations: 2100 -2lnl: 359.3732584
Number of evaluations: 2200 -2lnl: 287.0173231
Number of evaluations: 2300 -2lnl: 287.0173231
Number of evaluations: 2400 -2lnl: 296.5107384
Number of evaluations: 2500 -2lnl: 287.0173231
Number of evaluations: 2600 -2lnl: 287.0173231
Number of evaluations: 2700 -2lnl: 287.0173231
Number of evaluations: 2800 -2lnl: 287.0173231
Number of evaluations: 2900 -2lnl: 339.3475203
Number of evaluations: 3000 -2lnl: 287.0173281
Number of evaluations: 3100 -2lnl: 339.3476604
Number of evaluations: 3200 -2lnl: 287.0173231
Number of evaluations: 3300 -2lnl: 287.0173231
Number of evaluations: 3400 -2lnl: 296.5107384
Number of evaluations: 3500 -2lnl: 287.0173231
Number of evaluations: 3600 -2lnl: 287.0173231
Number of evaluations: 3700 -2lnl: 287.0173231
Number of evaluations: 3800 -2lnl: 287.0173281
Number of evaluations: 3900 -2lnl: 378.9754041
Number of evaluations: 4000 -2lnl: 288.7668091
Number of evaluations: 4100 -2lnl: 328.8368868
Number of evaluations: 4200 -2lnl: 289.3085202
Number of evaluations: 4300 -2lnl: 340.3031568
Number of evaluations: 4400 -2lnl: 287.4007399
Number of evaluations: 4500 -2lnl: 293.3671918
Number of evaluations: 4600 -2lnl: 296.5107384
Number of evaluations: 4700 -2lnl: 287.0173231
Number of evaluations: 4800 -2lnl: 287.0173231
Number of evaluations: 4900 -2lnl: 287.0173231
Number of evaluations: 5000 -2lnl: 287.0173231
Number of evaluations: 5100 -2lnl: 1875.932364
Number of evaluations: 5200 -2lnl: 407.1837231
Number of evaluations: 5300 -2lnl: 1778.42451
Number of evaluations: 5400 -2lnl: 310.5141071
Number of evaluations: 5500 -2lnl: 287.0173231
Number of evaluations: 5600 -2lnl: 287.0173231
Number of evaluations: 5700 -2lnl: 715.2852372
Number of evaluations: 5800 -2lnl: 314.1975748
Number of evaluations: 5900 -2lnl: 558.0236708
Number of evaluations: 6000 -2lnl: 345.5284447
Number of evaluations: 6100 -2lnl: 925.1066858
Number of evaluations: 6200 -2lnl: 336.0350293
Number of evaluations: 6300 -2lnl: 888.5578662
Number of evaluations: 6400 -2lnl: 323.0757696
Number of evaluations: 6500 -2lnl: 715.8132578
Number of evaluations: 6600 -2lnl: 319.8185446
Number of evaluations: 6700 -2lnl: 454.2191958
Number of evaluations: 6800 -2lnl: 296.3217605
Number of evaluations: 6900 -2lnl: 364.8875929
Number of evaluations: 7000 -2lnl: 289.7905159
Number of evaluations: 7100 -2lnl: 309.6866594
Number of evaluations: 7200 -2lnl: 316.9707677Phi.sizeclass.time.p.time
##
Number of evaluations: 100 -2lnl: 341.1952203
Number of evaluations: 200 -2lnl: 324.8886113
Number of evaluations: 300 -2lnl: 318.9779235
Number of evaluations: 400 -2lnl: 304.277455
Number of evaluations: 500 -2lnl: 288.2248732
Number of evaluations: 600 -2lnl: 283.9864882
Number of evaluations: 700 -2lnl: 280.5672719
Number of evaluations: 800 -2lnl: 277.0730317
Number of evaluations: 900 -2lnl: 274.5130163
Number of evaluations: 1000 -2lnl: 269.8621011
Number of evaluations: 1100 -2lnl: 266.7487574
Number of evaluations: 1200 -2lnl: 264.1232304
Number of evaluations: 1300 -2lnl: 260.9695043
Number of evaluations: 1400 -2lnl: 256.8824098
Number of evaluations: 1500 -2lnl: 255.7240345
Number of evaluations: 1600 -2lnl: 254.3551851
Number of evaluations: 1700 -2lnl: 253.0315313
Number of evaluations: 1800 -2lnl: 251.5840736
Number of evaluations: 1900 -2lnl: 250.8782611
Number of evaluations: 2000 -2lnl: 250.0813995
Number of evaluations: 2100 -2lnl: 248.8656381
Number of evaluations: 2200 -2lnl: 248.3703735
Number of evaluations: 2300 -2lnl: 247.7587355
Number of evaluations: 2400 -2lnl: 247.5517376
Number of evaluations: 2500 -2lnl: 247.371915
Number of evaluations: 2600 -2lnl: 247.3120714
Number of evaluations: 2700 -2lnl: 247.2298738
Number of evaluations: 2800 -2lnl: 247.1392451
Number of evaluations: 2900 -2lnl: 247.0527414
Number of evaluations: 3000 -2lnl: 246.9269509
Number of evaluations: 3100 -2lnl: 246.8391811
Number of evaluations: 3200 -2lnl: 246.8132469
Number of evaluations: 3300 -2lnl: 246.7940483
Number of evaluations: 3400 -2lnl: 246.7876752
Number of evaluations: 3500 -2lnl: 246.7845113
Number of evaluations: 3600 -2lnl: 246.7780143
Number of evaluations: 3700 -2lnl: 246.7745901
Number of evaluations: 3800 -2lnl: 246.7721192
Number of evaluations: 3900 -2lnl: 246.7709193
Number of evaluations: 4000 -2lnl: 246.7700283
Number of evaluations: 4100 -2lnl: 246.7698849
Number of evaluations: 4200 -2lnl: 246.7698315
Number of evaluations: 4300 -2lnl: 246.7698137
Number of evaluations: 4400 -2lnl: 246.7698095
Number of evaluations: 4500 -2lnl: 246.7697947
Number of evaluations: 4600 -2lnl: 246.7697785
Number of evaluations: 4700 -2lnl: 246.769741
Number of evaluations: 4800 -2lnl: 246.7690499
Number of evaluations: 4900 -2lnl: 246.7687627
Number of evaluations: 5000 -2lnl: 246.7687287
Number of evaluations: 5100 -2lnl: 246.7686767
Number of evaluations: 5200 -2lnl: 246.7686327
Number of evaluations: 5300 -2lnl: 246.7685608
Number of evaluations: 5400 -2lnl: 246.7685589
Number of evaluations: 5500 -2lnl: 246.7685518
Number of evaluations: 5600 -2lnl: 246.7685495
Number of evaluations: 5700 -2lnl: 246.768502
Number of evaluations: 5800 -2lnl: 246.7684956
Number of evaluations: 5900 -2lnl: 246.7684577
Number of evaluations: 6000 -2lnl: 246.7683936
Number of evaluations: 6100 -2lnl: 246.7683032
Number of evaluations: 6200 -2lnl: 246.767339
Number of evaluations: 6300 -2lnl: 246.7672148
Number of evaluations: 6400 -2lnl: 246.7670286
Number of evaluations: 6500 -2lnl: 246.7669183
Number of evaluations: 6600 -2lnl: 246.766318
Number of evaluations: 6700 -2lnl: 246.7661147
Number of evaluations: 6800 -2lnl: 246.7659124
Number of evaluations: 6900 -2lnl: 246.7656727
Number of evaluations: 7000 -2lnl: 246.7655812
Number of evaluations: 7100 -2lnl: 246.7654041
Number of evaluations: 7200 -2lnl: 246.7653442
Number of evaluations: 7300 -2lnl: 246.7652633
Number of evaluations: 7400 -2lnl: 246.7651416
Number of evaluations: 7500 -2lnl: 246.7648383
Number of evaluations: 7600 -2lnl: 246.7642109
Number of evaluations: 7700 -2lnl: 246.7618751
Number of evaluations: 7800 -2lnl: 246.761198
Number of evaluations: 7900 -2lnl: 246.7495328
Number of evaluations: 8000 -2lnl: 246.7476921
Number of evaluations: 8100 -2lnl: 246.7464673
Number of evaluations: 8200 -2lnl: 246.7460531
Number of evaluations: 8300 -2lnl: 246.746039
Number of evaluations: 8400 -2lnl: 246.746039
Number of evaluations: 8500 -2lnl: 246.746039
Number of evaluations: 8600 -2lnl: 247.0611991
Number of evaluations: 8700 -2lnl: 251.1025243
Number of evaluations: 8800 -2lnl: 267.7495576
Number of evaluations: 8900 -2lnl: 246.8062373
Number of evaluations: 9000 -2lnl: 252.6838723
Number of evaluations: 9100 -2lnl: 247.4094095
Number of evaluations: 9200 -2lnl: 249.3982649
Number of evaluations: 9300 -2lnl: 246.8034403
Number of evaluations: 9400 -2lnl: 247.5277158
Number of evaluations: 9500 -2lnl: 247.4094095
Number of evaluations: 9600 -2lnl: 246.746039
Number of evaluations: 9700 -2lnl: 246.746039
Number of evaluations: 9800 -2lnl: 252.6838723
Number of evaluations: 9900 -2lnl: 247.1582214
Number of evaluations: 10000 -2lnl: 266.8717695
Number of evaluations: 10100 -2lnl: 246.9434319
Number of evaluations: 10200 -2lnl: 247.3723682
Number of evaluations: 10300 -2lnl: 247.162256
Number of evaluations: 10400 -2lnl: 246.7460311
Number of evaluations: 10500 -2lnl: 249.0809659
Number of evaluations: 10600 -2lnl: 246.746039
Number of evaluations: 10700 -2lnl: 246.8034403
Number of evaluations: 10800 -2lnl: 251.1050092
Number of evaluations: 10900 -2lnl: 246.7608123
Number of evaluations: 11000 -2lnl: 247.3895275
Number of evaluations: 11100 -2lnl: 246.7509741
Number of evaluations: 11200 -2lnl: 246.7628454
Number of evaluations: 11300 -2lnl: 246.7499031
Number of evaluations: 11400 -2lnl: 246.7568549
Number of evaluations: 11500 -2lnl: 246.7593973
Number of evaluations: 11600 -2lnl: 247.3723672
Number of evaluations: 11700 -2lnl: 246.8034403
Number of evaluations: 11800 -2lnl: 251.1050092
Number of evaluations: 11900 -2lnl: 249.0809659
Number of evaluations: 12000 -2lnl: 246.746039
Number of evaluations: 12100 -2lnl: 246.7460385
Number of evaluations: 12200 -2lnl: 248.5918503
Number of evaluations: 12300 -2lnl: 246.8457522
Number of evaluations: 12400 -2lnl: 248.9745085
Number of evaluations: 12500 -2lnl: 247.2438058
Number of evaluations: 12600 -2lnl: 276.0701511
Number of evaluations: 12700 -2lnl: 247.1150426
Number of evaluations: 12800 -2lnl: 249.5146359
Number of evaluations: 12900 -2lnl: 246.8034398
Number of evaluations: 13000 -2lnl: 251.1050079
Number of evaluations: 13100 -2lnl: 246.8457515
Number of evaluations: 13200 -2lnl: 252.6838723
Number of evaluations: 13300 -2lnl: 246.746039
Number of evaluations: 13400 -2lnl: 246.9767181
Number of evaluations: 13500 -2lnl: 246.7606329
Number of evaluations: 13600 -2lnl: 247.0016751
Number of evaluations: 13700 -2lnl: 247.4304382
Number of evaluations: 13800 -2lnl: 247.0611991
Number of evaluations: 13900 -2lnl: 246.7669527
Number of evaluations: 14000 -2lnl: 247.962194
Number of evaluations: 14100 -2lnl: 246.7744039
Number of evaluations: 14200 -2lnl: 249.0179854
Number of evaluations: 14300 -2lnl: 246.8291278
Number of evaluations: 14400 -2lnl: 251.6592083
Number of evaluations: 14500 -2lnl: 246.8690964
Number of evaluations: 14600 -2lnl: 247.5277148
Number of evaluations: 14700 -2lnl: 246.7460386
Number of evaluations: 14800 -2lnl: 248.59185
Number of evaluations: 14900 -2lnl: 246.746039
Number of evaluations: 15000 -2lnl: 246.7460394
Number of evaluations: 15100 -2lnl: 246.746039
Number of evaluations: 100 -2lnl: 252.1421894
Number of evaluations: 200 -2lnl: 246.7475886
Number of evaluations: 300 -2lnl: 247.2329177
Number of evaluations: 400 -2lnl: 249.5030827
Number of evaluations: 500 -2lnl: 246.9970265
Number of evaluations: 600 -2lnl: 246.7488731
Number of evaluations: 700 -2lnl: 296.4483832
Number of evaluations: 800 -2lnl: 248.8161601
Number of evaluations: 900 -2lnl: 252.14219
Number of evaluations: 1000 -2lnl: 246.746039
Number of evaluations: 1100 -2lnl: 246.7460396
Number of evaluations: 1200 -2lnl: 248.8161601
Number of evaluations: 1300 -2lnl: 288.8769906
Number of evaluations: 1400 -2lnl: 246.746039
Number of evaluations: 1500 -2lnl: 246.746039
Number of evaluations: 1600 -2lnl: 247.1488962
Number of evaluations: 1700 -2lnl: 246.7460672
Number of evaluations: 1800 -2lnl: 246.7460431
Number of evaluations: 1900 -2lnl: 248.9134146
Number of evaluations: 2000 -2lnl: 246.8273125
Number of evaluations: 2100 -2lnl: 252.1422134
Number of evaluations: 2200 -2lnl: 247.4329616
Number of evaluations: 2300 -2lnl: 246.746039
Number of evaluations: 2400 -2lnl: 246.746039
Number of evaluations: 2500 -2lnl: 246.7460672
Number of evaluations: 2600 -2lnl: 246.7507794
Number of evaluations: 2700 -2lnl: 246.776744
Number of evaluations: 2800 -2lnl: 246.7689683
Number of evaluations: 2900 -2lnl: 246.8694623
Number of evaluations: 3000 -2lnl: 246.7649704
Number of evaluations: 3100 -2lnl: 246.7646342
Number of evaluations: 3200 -2lnl: 246.748874
Number of evaluations: 3300 -2lnl: 246.7460735
Number of evaluations: 3400 -2lnl: 246.746039
Number of evaluations: 3500 -2lnl: 246.7460672
Number of evaluations: 3600 -2lnl: 247.4329616
Number of evaluations: 3700 -2lnl: 246.746039
Number of evaluations: 3800 -2lnl: 246.746039
Number of evaluations: 3900 -2lnl: 253.3602765
Number of evaluations: 4000 -2lnl: 246.838883
Number of evaluations: 4100 -2lnl: 249.2871001
Number of evaluations: 4200 -2lnl: 246.8900045
Number of evaluations: 4300 -2lnl: 249.2985025
Number of evaluations: 4400 -2lnl: 246.9143164
Number of evaluations: 4500 -2lnl: 249.3623313
Number of evaluations: 4600 -2lnl: 246.7460402
Number of evaluations: 4700 -2lnl: 246.7460793
Number of evaluations: 4800 -2lnl: 246.8900015
Number of evaluations: 4900 -2lnl: 246.746039
Number of evaluations: 5000 -2lnl: 246.746039
Number of evaluations: 5100 -2lnl: 289.3149179
Number of evaluations: 5200 -2lnl: 246.7607528
Number of evaluations: 5300 -2lnl: 246.9843906
Number of evaluations: 5400 -2lnl: 248.8379353
Number of evaluations: 5500 -2lnl: 247.1158994
Number of evaluations: 5600 -2lnl: 246.7678142
Number of evaluations: 5700 -2lnl: 247.2329183
Number of evaluations: 5800 -2lnl: 247.183951
Number of evaluations: 5900 -2lnl: 249.5219819
Number of evaluations: 6000 -2lnl: 246.7734436
Number of evaluations: 6100 -2lnl: 247.229063
Number of evaluations: 6200 -2lnl: 246.9154116
Number of evaluations: 6300 -2lnl: 246.7460448
Number of evaluations: 6400 -2lnl: 247.1488968
Number of evaluations: 6500 -2lnl: 249.0361237Phi.time.p.dot
##
Number of evaluations: 100 -2lnl: 328.1211836
Number of evaluations: 200 -2lnl: 327.9536487
Number of evaluations: 300 -2lnl: 327.9520842
Number of evaluations: 400 -2lnl: 328.0779905
Number of evaluations: 500 -2lnl: 328.0092068
Number of evaluations: 100 -2lnl: 328.8707532Phi.time.p.size
##
Number of evaluations: 100 -2lnl: 315.3989885
Number of evaluations: 200 -2lnl: 310.06947
Number of evaluations: 300 -2lnl: 306.7161663
Number of evaluations: 400 -2lnl: 306.3462674
Number of evaluations: 500 -2lnl: 306.325045
Number of evaluations: 600 -2lnl: 306.3237006
Number of evaluations: 700 -2lnl: 306.3293711
Number of evaluations: 800 -2lnl: 306.3236183
Number of evaluations: 900 -2lnl: 306.3236191
Number of evaluations: 1000 -2lnl: 322.4759007
Number of evaluations: 1100 -2lnl: 307.4244845
Number of evaluations: 1200 -2lnl: 308.2376396
Number of evaluations: 1300 -2lnl: 306.3236803
Number of evaluations: 100 -2lnl: 306.6227943
Number of evaluations: 200 -2lnl: 310.2730231
Number of evaluations: 300 -2lnl: 326.0887088
Number of evaluations: 400 -2lnl: 307.5799202
Number of evaluations: 500 -2lnl: 395.0337815
Number of evaluations: 600 -2lnl: 307.7218379Phi.time.p.time
##
Number of evaluations: 100 -2lnl: 289.7513395
Number of evaluations: 200 -2lnl: 287.4244863
Number of evaluations: 300 -2lnl: 287.3939316
Number of evaluations: 400 -2lnl: 287.3927102
Number of evaluations: 500 -2lnl: 287.3960439
Number of evaluations: 600 -2lnl: 287.3983316
Number of evaluations: 700 -2lnl: 287.5031142
Number of evaluations: 800 -2lnl: 287.4014141
Number of evaluations: 100 -2lnl: 287.3941122
Number of evaluations: 200 -2lnl: 287.4213531
Number of evaluations: 300 -2lnl: 288.2963032
Number of evaluations: 400 -2lnl: 287.4063754
turtleyear1.cjs.models
## model npar AIC DeltaAIC weight
## 6 Phi(~Size.Class)p(~time) 12 300.2604 0.0000000 5.208960e-01
## 3 Phi(~1)p(~time) 6 300.4901 0.2296936 4.643802e-01
## 12 Phi(~time)p(~time) 10 307.3927 7.1323190 1.472271e-02
## 9 Phi(~Size.Class * time)p(~time) 40 326.7460 26.4856671 9.235523e-07
## 11 Phi(~time)p(~Size.Class) 12 330.3236 30.0632477 1.543831e-07
## 10 Phi(~time)p(~1) 6 339.9493 39.6889738 1.254296e-09
## 2 Phi(~1)p(~Size.Class) 8 341.7458 41.4854664 5.108536e-10
## 4 Phi(~Size.Class)p(~1) 8 349.5224 49.2620706 1.046233e-11
## 1 Phi(~1)p(~1) 2 350.8048 50.5444007 5.510283e-12
## 5 Phi(~Size.Class)p(~Size.Class) 14 351.6257 51.3653288 3.655204e-12
## 7 Phi(~Size.Class * time)p(~1) 36 362.5286 62.2682555 1.568091e-14
## 8 Phi(~Size.Class * time)p(~Size.Class) 42 371.0173 70.7569512 2.249439e-16
## neg2lnl convergence
## 6 276.2604 0
## 3 288.4901 0
## 12 287.3927 0
## 9 246.7460 0
## 11 306.3236 0
## 10 327.9493 0
## 2 325.7458 0
## 4 333.5224 0
## 1 346.8048 0
## 5 323.6257 0
## 7 290.5286 0
## 8 287.0173 0
We see in the listings for these models that the best model is a model that uses size class specific estimates for survival, or uses the predictor of size class for \(\phi\), and again year specific estimates of \(p\). Because the model here that is second best is the same as the best model that was found using the sex variable, we can say that the overall best model for this data is one the best model found here.
Therefore the best model for this data set using these variables is one that uses size class specific estimates for survival and year specific estimates for detection. We can then use this model to predict \(\phi\) and \(p\).
bestmodel.proc <- process.data(Turtles_ch_by_Year,
group = "Size.Class") # group variable has to be in the data
# Make design data (from processed data)
bestmodel.ddl <- make.design.data(bestmodel.proc)
# Outine formulas for each parameter
Phi.dot <- list(formula=~1) # ~1 is always a constant (or single estimate)
Phi.Size.Class <- list(formula=~Size.Class) # This formula will have an intercept (for females) and an estimate for the difference between females and males
p.time <- list(formula=~time) # Be careful of case-sensitive names. Use the exact group column that was in data
# Make new model (using design data) with constant survival, but different detection probabilities between sexes
cjs.m2 <- crm(bestmodel.proc,
bestmodel.ddl,
model.parameters = list(Phi = Phi.Size.Class,
p = p.time),
accumulate = FALSE)
##
Number of evaluations: 100 -2lnl: 307.251317
Number of evaluations: 200 -2lnl: 283.6029894
Number of evaluations: 300 -2lnl: 279.7101732
Number of evaluations: 400 -2lnl: 276.3620376
Number of evaluations: 500 -2lnl: 276.2886447
Number of evaluations: 600 -2lnl: 276.2622166
Number of evaluations: 700 -2lnl: 276.5766653
Number of evaluations: 800 -2lnl: 276.3185638
Number of evaluations: 900 -2lnl: 277.3599131
Number of evaluations: 1000 -2lnl: 276.2658512
Number of evaluations: 1100 -2lnl: 276.4862503
Number of evaluations: 1200 -2lnl: 276.2726855
Number of evaluations: 1300 -2lnl: 276.260374
predict(cjs.m2)
## $Phi
## Size.Class occ estimate
## 1 4 4 9.676198e-01
## 2 3 3 9.358280e-01
## 3 2 5 8.047432e-01
## 4 5 4 9.538861e-01
## 5 1 5 3.180337e-06
## 6 6 1 7.739533e-01
## 7 0 1 1.438245e-03
##
## $p
## time occ estimate
## 1 5 5 0.9385161
## 2 6 6 0.5102832
## 3 4 4 0.8047678
## 4 3 3 0.8687649
## 5 2 2 0.2197628
Looking at the output of this model we can see that for \(\phi\) we have the lowest probability of survival at size class 1, and this probability of survival is estimated at less than 1%. The next size class is size class 2 with a probability of survival of about 80%, and then 3 is about 94%, 4 is the highest at about 97%, and then 5 is about 95%, and 6 drops back down to about 77%. The size class of zero is the estimated survival probability for this one turtle of unknown size and therefore is not very relevant. We can then look at the probabilities of detection, \(p\) found by the model and we see that year 5, or 2022 has the highest estimated probability of detection, at about 94%, followed by 2020 at 86%, then 2021 is 80%, 2023 is lower than the others at 51% and lastly 2019 has the lowest estimated detection probability by far at about 22%.
We see that in our found estimates of \(\phi\) the probability of survival for the most part goes up with size class, especially from size class 1, and then stabilizes as size class goes up. This makes sense from an ecological perspective as it is common in populations for small and young members of a species to have drastically lower survival probabilities than larger, established members of a population. Although, survival for size class 1 is very low in this model and is probably lower than what we would expect to see. It is really interesting to look at how much detection probability varies by year, as the probability of detection is seen to vary greatly between years in the model estimates. This leads to questions about whether sampling effort may have changed somehow between years, or if environmental variables in some years may have been having an unknown effect. It is also interesting to note that sex of the turtles did not have enough of an effect on either survival or detection for these turtles to be worth including in the model.
This modeling method had strengths in that it allows for multiple categorical variables to be looked at as factors in the modeling process, and especially that it allowed for year specific estimates of \(\phi\) and \(p\). A weakness of this modeling method is that death cannot be separated from emigration, although due to the nature of this data set this may not be a big deal for this model. Another weakness is that the model could only handle capture events by year, and while this data set had 57 separate capture events recorded, they had to be collapsed down into capture histories by year over the 6 years in which they were carried out. A robust design model might be a better way to handle all of the capture events and could be interesting to look into further with this data set.
Another issue in the analysis is the variable of size class, and how the turtle of unknown size class was treated. By creating a separate classification for this turtle it may have led to an inflated significance of size class in this model because there was a class that was specifically the survival probability of this one turtle, by way of including the unknown size class as its own grouping. Retrospectively, instead of creating a separate category for unknown for this one turtle, it may have been better to remove this turtle from the analysis of size class and differential survival so that the significance of this predictor is not over-inflated by the addition of this category for one specific turtle.