## Bring in the Data and Process it

Here, the data are for imaginary swamp squirrels. There are data for 6 sampling occasions and for 2 groups: squirrels first captured when they were juveniles or when they were older. There are also 2 continuous covariates: birth (birth date) and tail (tail length). The code creates tail length squared and provides information on precipitation levels during capture work each year, which might have affected capture probability (p).

library(knitr)
library(ggplot2)
library(RMark)
## This is RMark 2.2.4
##  Documentation available at http://www.phidot.org/software/mark/rmark/RMarkDocumentation.zip
sq <- convert.inp("http://www.montana.edu/rotella/documents/502/SwampSquirrels.inp",
group.df = data.frame(age = c("juv","older")),
covariates = c("birth", "tail"))
sq$tail.sq <- sq$tail^2

sq.pr <- process.data(sq, model = "CJS",
age.var = 1,
initial.ages = c(0, 1),
groups = ("age"))

# Create default design data
# For Phi, values are 0 or older; for p the values are 1 or older
# This provides an individual covariate for each parameter type
# that changes as the animal ages
sq.ddl = make.design.data(sq.pr,
parameters = list(Phi = list(age.bins = c(0, 1, 6)),
p = list(age.bins = c(1, 2, 6))),
right = FALSE)

# Create precipitation variable
sq.ddl$p$precip = 0 # Start with 0 for all and then over-write
sq.ddl$p$precip[sq.ddl$p$time == 2] = 0.11
sq.ddl$p$precip[sq.ddl$p$time == 3] = 1.38
sq.ddl$p$precip[sq.ddl$p$time == 4] = 1.12
sq.ddl$p$precip[sq.ddl$p$time == 5] = 1.58
sq.ddl$p$precip[sq.ddl$p$time == 6] = 1.87

## Set up Function for Competing Models

run.sq = function() {
#  Define range of models for Phi
#
Phi.dot = list(formula =  ~ 1)
Phi.age = list(formula =  ~ age)
Phi.age.birth = list(formula =  ~ age + birth)
Phi.age.tail = list(formula =  ~ age + tail)
Phi.age.tail.sq = list(formula =  ~ age + tail + tail.sq)
Phi.age.birth.tail = list(formula =  ~ age + birth + tail)
Phi.age.birth.tail.sq = list(formula =  ~ age + birth + tail + tail.sq)

#  Define range of models for p
p.dot = list(formula =  ~ 1)
p.time = list(formula =  ~ -1 + time)
p.precip = list(formula = ~ precip)

# Create models for all combinations of phi & p
sq.model.list = create.model.list("CJS")

# NOTE: to avoid having all the output for each model appear when you
# call the function, add ', output=FALSE' after 'ddl=sq.ddl' below.
# Here, I don't do that so you can see the output for each model,
# but this might not be desired if you have many models.
sq.results = mark.wrapper(sq.model.list,
data = sq.pr, ddl = sq.ddl)
#
# Return model table and list of models
#
return(sq.results)
}

## Run the Models

The code below runs all combinations of structures in the function for $$\phi$$ and $$p$$. The code also produces a model-selection table.

sq.res <- run.sq()
##
## Phi.age.p.dot
##
## Output summary for CJS model
## Name : Phi(~age)p(~1)
##
## Npar :  3
## -2lnL:  2186.255
## AICc :  2192.278
##
## Beta
##                   estimate        se        lcl        ucl
## Phi:(Intercept)  0.6239824 0.2112875  0.2098589  1.0381059
## Phi:age[1,6]     1.9388934 0.3890517  1.1763520  2.7014349
## p:(Intercept)   -0.9559930 0.0903185 -1.1330172 -0.7789687
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.6511237 0.9284338 0.9284338 0.9284338 0.9284338
## 2           0.6511237 0.9284338 0.9284338 0.9284338
## 3                     0.6511237 0.9284338 0.9284338
## 4                               0.6511237 0.9284338
## 5                                         0.6511237
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.9284338 0.9284338 0.9284338 0.9284338 0.9284338
## 2           0.9284338 0.9284338 0.9284338 0.9284338
## 3                     0.9284338 0.9284338 0.9284338
## 4                               0.9284338 0.9284338
## 5                                         0.9284338
##
##
## Real Parameter p
## Group:agejuv
##           2         3         4         5         6
## 1 0.2776812 0.2776812 0.2776812 0.2776812 0.2776812
## 2           0.2776812 0.2776812 0.2776812 0.2776812
## 3                     0.2776812 0.2776812 0.2776812
## 4                               0.2776812 0.2776812
## 5                                         0.2776812
##
## Group:ageolder
##           2         3         4         5         6
## 1 0.2776812 0.2776812 0.2776812 0.2776812 0.2776812
## 2           0.2776812 0.2776812 0.2776812 0.2776812
## 3                     0.2776812 0.2776812 0.2776812
## 4                               0.2776812 0.2776812
## 5                                         0.2776812
##
## Phi.age.birth.p.dot
##
## Output summary for CJS model
## Name : Phi(~age + birth)p(~1)
##
## Npar :  4
## -2lnL:  2183.682
## AICc :  2191.72
##
## Beta
##                   estimate        se        lcl        ucl
## Phi:(Intercept)  1.8179051 0.8074219  0.2353583  3.4004520
## Phi:age[1,6]     1.8336413 0.3714952  1.1055107  2.5617719
## Phi:birth       -0.0511213 0.0322114 -0.1142558  0.0120131
## p:(Intercept)   -0.9486139 0.0888767 -1.1228123 -0.7744155
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.6619364 0.9245319 0.9245319 0.9245319 0.9245319
## 2           0.6619364 0.9245319 0.9245319 0.9245319
## 3                     0.6619364 0.9245319 0.9245319
## 4                               0.6619364 0.9245319
## 5                                         0.6619364
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.9245319 0.9245319 0.9245319 0.9245319 0.9245319
## 2           0.9245319 0.9245319 0.9245319 0.9245319
## 3                     0.9245319 0.9245319 0.9245319
## 4                               0.9245319 0.9245319
## 5                                         0.9245319
##
##
## Real Parameter p
## Group:agejuv
##           2         3         4         5         6
## 1 0.2791637 0.2791637 0.2791637 0.2791637 0.2791637
## 2           0.2791637 0.2791637 0.2791637 0.2791637
## 3                     0.2791637 0.2791637 0.2791637
## 4                               0.2791637 0.2791637
## 5                                         0.2791637
##
## Group:ageolder
##           2         3         4         5         6
## 1 0.2791637 0.2791637 0.2791637 0.2791637 0.2791637
## 2           0.2791637 0.2791637 0.2791637 0.2791637
## 3                     0.2791637 0.2791637 0.2791637
## 4                               0.2791637 0.2791637
## 5                                         0.2791637
##
## Phi.age.birth.tail.p.dot
##
## Output summary for CJS model
## Name : Phi(~age + birth + tail)p(~1)
##
## Npar :  5
## -2lnL:  2183.089
## AICc :  2193.147
##
## Beta
##                   estimate        se        lcl        ucl
## Phi:(Intercept)  1.4273145 0.9301214 -0.3957235  3.2503525
## Phi:age[1,6]     1.8000886 0.3598210  1.0948393  2.5053378
## Phi:birth       -0.0540289 0.0322413 -0.1172218  0.0091640
## Phi:tail         0.0257815 0.0331620 -0.0392160  0.0907791
## p:(Intercept)   -0.9399963 0.0888603 -1.1141625 -0.7658300
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.6607887 0.9217885 0.9217885 0.9217885 0.9217885
## 2           0.6607887 0.9217885 0.9217885 0.9217885
## 3                     0.6607887 0.9217885 0.9217885
## 4                               0.6607887 0.9217885
## 5                                         0.6607887
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.9217885 0.9217885 0.9217885 0.9217885 0.9217885
## 2           0.9217885 0.9217885 0.9217885 0.9217885
## 3                     0.9217885 0.9217885 0.9217885
## 4                               0.9217885 0.9217885
## 5                                         0.9217885
##
##
## Real Parameter p
## Group:agejuv
##           2         3         4         5         6
## 1 0.2809011 0.2809011 0.2809011 0.2809011 0.2809011
## 2           0.2809011 0.2809011 0.2809011 0.2809011
## 3                     0.2809011 0.2809011 0.2809011
## 4                               0.2809011 0.2809011
## 5                                         0.2809011
##
## Group:ageolder
##           2         3         4         5         6
## 1 0.2809011 0.2809011 0.2809011 0.2809011 0.2809011
## 2           0.2809011 0.2809011 0.2809011 0.2809011
## 3                     0.2809011 0.2809011 0.2809011
## 4                               0.2809011 0.2809011
## 5                                         0.2809011
##
## Phi.age.birth.tail.sq.p.dot
##
## Output summary for CJS model
## Name : Phi(~age + birth + tail + tail.sq)p(~1)
##
## Npar :  6
## -2lnL:  2170.843
## AICc :  2182.923
##
## Beta
##                   estimate        se         lcl        ucl
## Phi:(Intercept) -5.6597369 2.2231079 -10.0170290 -1.3024452
## Phi:age[1,6]     1.8775891 0.3692920   1.1537768  2.6014013
## Phi:birth       -0.0632787 0.0329433  -0.1278475  0.0012902
## Phi:tail         0.9156725 0.2717132   0.3831146  1.4482304
## Phi:tail.sq     -0.0252988 0.0076885  -0.0403683 -0.0102293
## p:(Intercept)   -0.9436603 0.0881330  -1.1164009 -0.7709196
##
##
## Real Parameter Phi
## Group:agejuv
##          1         2         3         4         5
## 1 0.664303 0.9282504 0.9282504 0.9282504 0.9282504
## 2          0.6643030 0.9282504 0.9282504 0.9282504
## 3                    0.6643030 0.9282504 0.9282504
## 4                              0.6643030 0.9282504
## 5                                        0.6643030
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.9282504 0.9282504 0.9282504 0.9282504 0.9282504
## 2           0.9282504 0.9282504 0.9282504 0.9282504
## 3                     0.9282504 0.9282504 0.9282504
## 4                               0.9282504 0.9282504
## 5                                         0.9282504
##
##
## Real Parameter p
## Group:agejuv
##           2         3         4         5         6
## 1 0.2801616 0.2801616 0.2801616 0.2801616 0.2801616
## 2           0.2801616 0.2801616 0.2801616 0.2801616
## 3                     0.2801616 0.2801616 0.2801616
## 4                               0.2801616 0.2801616
## 5                                         0.2801616
##
## Group:ageolder
##           2         3         4         5         6
## 1 0.2801616 0.2801616 0.2801616 0.2801616 0.2801616
## 2           0.2801616 0.2801616 0.2801616 0.2801616
## 3                     0.2801616 0.2801616 0.2801616
## 4                               0.2801616 0.2801616
## 5                                         0.2801616
##
## Phi.age.tail.p.dot
##
## Output summary for CJS model
## Name : Phi(~age + tail)p(~1)
##
## Npar :  4
## -2lnL:  2185.969
## AICc :  2194.007
##
## Beta
##                   estimate        se        lcl        ucl
## Phi:(Intercept)  0.3033554 0.6191434 -0.9101657  1.5168764
## Phi:age[1,6]     1.9125222 0.3778012  1.1720318  2.6530127
## Phi:tail         0.0179118 0.0330763 -0.0469177  0.0827413
## p:(Intercept)   -0.9485703 0.0904427 -1.1258380 -0.7713027
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.6494088 0.9261475 0.9261475 0.9261475 0.9261475
## 2           0.6494088 0.9261475 0.9261475 0.9261475
## 3                     0.6494088 0.9261475 0.9261475
## 4                               0.6494088 0.9261475
## 5                                         0.6494088
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.9261475 0.9261475 0.9261475 0.9261475 0.9261475
## 2           0.9261475 0.9261475 0.9261475 0.9261475
## 3                     0.9261475 0.9261475 0.9261475
## 4                               0.9261475 0.9261475
## 5                                         0.9261475
##
##
## Real Parameter p
## Group:agejuv
##           2         3         4         5         6
## 1 0.2791724 0.2791724 0.2791724 0.2791724 0.2791724
## 2           0.2791724 0.2791724 0.2791724 0.2791724
## 3                     0.2791724 0.2791724 0.2791724
## 4                               0.2791724 0.2791724
## 5                                         0.2791724
##
## Group:ageolder
##           2         3         4         5         6
## 1 0.2791724 0.2791724 0.2791724 0.2791724 0.2791724
## 2           0.2791724 0.2791724 0.2791724 0.2791724
## 3                     0.2791724 0.2791724 0.2791724
## 4                               0.2791724 0.2791724
## 5                                         0.2791724
##
## Phi.age.tail.sq.p.dot
##
## Output summary for CJS model
## Name : Phi(~age + tail + tail.sq)p(~1)
##
## Npar :  5
## -2lnL:  2174.668
## AICc :  2184.725
##
## Beta
##                   estimate        se         lcl        ucl
## Phi:(Intercept) -6.7132890 2.2229803 -11.0703300 -2.3562476
## Phi:age[1,6]     2.0081081 0.3886780   1.2462992  2.7699170
## Phi:tail         0.8723724 0.2706970   0.3418063  1.4029386
## Phi:tail.sq     -0.0242767 0.0076751  -0.0393198 -0.0092336
## p:(Intercept)   -0.9528451 0.0890875  -1.1274567 -0.7782335
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.6510651 0.9328824 0.9328824 0.9328824 0.9328824
## 2           0.6510651 0.9328824 0.9328824 0.9328824
## 3                     0.6510651 0.9328824 0.9328824
## 4                               0.6510651 0.9328824
## 5                                         0.6510651
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.9328824 0.9328824 0.9328824 0.9328824 0.9328824
## 2           0.9328824 0.9328824 0.9328824 0.9328824
## 3                     0.9328824 0.9328824 0.9328824
## 4                               0.9328824 0.9328824
## 5                                         0.9328824
##
##
## Real Parameter p
## Group:agejuv
##          2        3        4        5        6
## 1 0.278313 0.278313 0.278313 0.278313 0.278313
## 2          0.278313 0.278313 0.278313 0.278313
## 3                   0.278313 0.278313 0.278313
## 4                            0.278313 0.278313
## 5                                     0.278313
##
## Group:ageolder
##          2        3        4        5        6
## 1 0.278313 0.278313 0.278313 0.278313 0.278313
## 2          0.278313 0.278313 0.278313 0.278313
## 3                   0.278313 0.278313 0.278313
## 4                            0.278313 0.278313
## 5                                     0.278313
##
## Phi.dot.p.dot
##
## Output summary for CJS model
## Name : Phi(~1)p(~1)
##
## Npar :  2
## -2lnL:  2210.491
## AICc :  2214.503
##
## Beta
##                  estimate        se       lcl        ucl
## Phi:(Intercept)  2.089115 0.2336739  1.631114  2.5471163
## p:(Intercept)   -1.061821 0.0894965 -1.237235 -0.8864082
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.8898407 0.8898407 0.8898407 0.8898407 0.8898407
## 2           0.8898407 0.8898407 0.8898407 0.8898407
## 3                     0.8898407 0.8898407 0.8898407
## 4                               0.8898407 0.8898407
## 5                                         0.8898407
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.8898407 0.8898407 0.8898407 0.8898407 0.8898407
## 2           0.8898407 0.8898407 0.8898407 0.8898407
## 3                     0.8898407 0.8898407 0.8898407
## 4                               0.8898407 0.8898407
## 5                                         0.8898407
##
##
## Real Parameter p
## Group:agejuv
##           2         3         4         5         6
## 1 0.2569615 0.2569615 0.2569615 0.2569615 0.2569615
## 2           0.2569615 0.2569615 0.2569615 0.2569615
## 3                     0.2569615 0.2569615 0.2569615
## 4                               0.2569615 0.2569615
## 5                                         0.2569615
##
## Group:ageolder
##           2         3         4         5         6
## 1 0.2569615 0.2569615 0.2569615 0.2569615 0.2569615
## 2           0.2569615 0.2569615 0.2569615 0.2569615
## 3                     0.2569615 0.2569615 0.2569615
## 4                               0.2569615 0.2569615
## 5                                         0.2569615
##
## Phi.age.p.precip
##
## Output summary for CJS model
## Name : Phi(~age)p(~precip)
##
## Npar :  4
## -2lnL:  2179.104
## AICc :  2187.142
##
## Beta
##                   estimate        se        lcl        ucl
## Phi:(Intercept)  0.5843557 0.2089558  0.1748023  0.9939092
## Phi:age[1,6]     1.6961371 0.3420609  1.0256977  2.3665764
## p:(Intercept)   -1.4338217 0.2058808 -1.8373480 -1.0302954
## p:precip         0.3678666 0.1420190  0.0895094  0.6462239
##
##
## Real Parameter Phi
## Group:agejuv
##          1         2         3         4         5
## 1 0.642069 0.9072485 0.9072485 0.9072485 0.9072485
## 2          0.6420690 0.9072485 0.9072485 0.9072485
## 3                    0.6420690 0.9072485 0.9072485
## 4                              0.6420690 0.9072485
## 5                                        0.6420690
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.9072485 0.9072485 0.9072485 0.9072485 0.9072485
## 2           0.9072485 0.9072485 0.9072485 0.9072485
## 3                     0.9072485 0.9072485 0.9072485
## 4                               0.9072485 0.9072485
## 5                                         0.9072485
##
##
## Real Parameter p
## Group:agejuv
##           2         3         4         5         6
## 1 0.1988725 0.2837033 0.2646748 0.2988893 0.3217129
## 2           0.2837033 0.2646748 0.2988893 0.3217129
## 3                     0.2646748 0.2988893 0.3217129
## 4                               0.2988893 0.3217129
## 5                                         0.3217129
##
## Group:ageolder
##           2         3         4         5         6
## 1 0.1988725 0.2837033 0.2646748 0.2988893 0.3217129
## 2           0.2837033 0.2646748 0.2988893 0.3217129
## 3                     0.2646748 0.2988893 0.3217129
## 4                               0.2988893 0.3217129
## 5                                         0.3217129
##
## Phi.age.birth.p.precip
##
## Output summary for CJS model
## Name : Phi(~age + birth)p(~precip)
##
## Npar :  5
## -2lnL:  2176.414
## AICc :  2186.472
##
## Beta
##                   estimate        se        lcl        ucl
## Phi:(Intercept)  1.6789227 0.7305315  0.2470809  3.1107645
## Phi:age[1,6]     1.6196341 0.3346467  0.9637265  2.2755418
## Phi:birth       -0.0469024 0.0289931 -0.1037289  0.0099240
## p:(Intercept)   -1.4328090 0.2061664 -1.8368952 -1.0287228
## p:precip         0.3702742 0.1417990  0.0923482  0.6482002
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.6519284 0.9044053 0.9044053 0.9044053 0.9044053
## 2           0.6519284 0.9044053 0.9044053 0.9044053
## 3                     0.6519284 0.9044053 0.9044053
## 4                               0.6519284 0.9044053
## 5                                         0.6519284
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.9044053 0.9044053 0.9044053 0.9044053 0.9044053
## 2           0.9044053 0.9044053 0.9044053 0.9044053
## 3                     0.9044053 0.9044053 0.9044053
## 4                               0.9044053 0.9044053
## 5                                         0.9044053
##
##
## Real Parameter p
## Group:agejuv
##           2        3         4         5         6
## 1 0.1990761 0.284585 0.2653973 0.2998997 0.3229175
## 2           0.284585 0.2653973 0.2998997 0.3229175
## 3                    0.2653973 0.2998997 0.3229175
## 4                              0.2998997 0.3229175
## 5                                        0.3229175
##
## Group:ageolder
##           2        3         4         5         6
## 1 0.1990761 0.284585 0.2653973 0.2998997 0.3229175
## 2           0.284585 0.2653973 0.2998997 0.3229175
## 3                    0.2653973 0.2998997 0.3229175
## 4                              0.2998997 0.3229175
## 5                                        0.3229175
##
## Phi.age.birth.tail.p.precip
##
## Output summary for CJS model
## Name : Phi(~age + birth + tail)p(~precip)
##
## Npar :  6
## -2lnL:  2175.531
## AICc :  2187.612
##
## Beta
##                   estimate        se        lcl        ucl
## Phi:(Intercept)  1.2519767 0.8381723 -0.3908411  2.8947945
## Phi:age[1,6]     1.5976922 0.3262301  0.9582812  2.2371032
## Phi:birth       -0.0498363 0.0290203 -0.1067160  0.0070434
## Phi:tail         0.0278200 0.0294482 -0.0298985  0.0855384
## p:(Intercept)   -1.4345751 0.2064732 -1.8392625 -1.0298876
## p:precip         0.3774840 0.1417749  0.0996051  0.6553629
##
##
## Real Parameter Phi
## Group:agejuv
##          1         2         3         4         5
## 1 0.650466 0.9019234 0.9019234 0.9019234 0.9019234
## 2          0.6504660 0.9019234 0.9019234 0.9019234
## 3                    0.6504660 0.9019234 0.9019234
## 4                              0.6504660 0.9019234
## 5                                        0.6504660
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.9019234 0.9019234 0.9019234 0.9019234 0.9019234
## 2           0.9019234 0.9019234 0.9019234 0.9019234
## 3                     0.9019234 0.9019234 0.9019234
## 4                               0.9019234 0.9019234
## 5                                         0.9019234
##
##
## Real Parameter p
## Group:agejuv
##          2         3         4         5         6
## 1 0.198921 0.2862541 0.2666291 0.3019245 0.3254845
## 2          0.2862541 0.2666291 0.3019245 0.3254845
## 3                    0.2666291 0.3019245 0.3254845
## 4                              0.3019245 0.3254845
## 5                                        0.3254845
##
## Group:ageolder
##          2         3         4         5         6
## 1 0.198921 0.2862541 0.2666291 0.3019245 0.3254845
## 2          0.2862541 0.2666291 0.3019245 0.3254845
## 3                    0.2666291 0.3019245 0.3254845
## 4                              0.3019245 0.3254845
## 5                                        0.3254845
##
## Phi.age.birth.tail.sq.p.precip
##
## Output summary for CJS model
## Name : Phi(~age + birth + tail + tail.sq)p(~precip)
##
## Npar :  7
## -2lnL:  2163.95
## AICc :  2178.057
##
## Beta
##                   estimate        se        lcl           ucl
## Phi:(Intercept) -5.0243332 2.0295906 -9.0023309 -1.0463356000
## Phi:age[1,6]     1.6786653 0.3385933  1.0150223  2.3423082000
## Phi:birth       -0.0582659 0.0297967 -0.1166675  0.0001357313
## Phi:tail         0.8179389 0.2474912  0.3328561  1.3030216000
## Phi:tail.sq     -0.0225186 0.0070058 -0.0362499 -0.0087873000
## p:(Intercept)   -1.4161906 0.2060090 -1.8199681 -1.0124130000
## p:precip         0.3596383 0.1412744  0.0827404  0.6365363000
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.6520406 0.9094293 0.9094293 0.9094293 0.9094293
## 2           0.6520406 0.9094293 0.9094293 0.9094293
## 3                     0.6520406 0.9094293 0.9094293
## 4                               0.6520406 0.9094293
## 5                                         0.6520406
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.9094293 0.9094293 0.9094293 0.9094293 0.9094293
## 2           0.9094293 0.9094293 0.9094293 0.9094293
## 3                     0.9094293 0.9094293 0.9094293
## 4                               0.9094293 0.9094293
## 5                                         0.9094293
##
##
## Real Parameter p
## Group:agejuv
##           2         3         4         5         6
## 1 0.2015507 0.2849804 0.2663158 0.2998605 0.3222028
## 2           0.2849804 0.2663158 0.2998605 0.3222028
## 3                     0.2663158 0.2998605 0.3222028
## 4                               0.2998605 0.3222028
## 5                                         0.3222028
##
## Group:ageolder
##           2         3         4         5         6
## 1 0.2015507 0.2849804 0.2663158 0.2998605 0.3222028
## 2           0.2849804 0.2663158 0.2998605 0.3222028
## 3                     0.2663158 0.2998605 0.3222028
## 4                               0.2998605 0.3222028
## 5                                         0.3222028
##
## Phi.age.tail.p.precip
##
## Output summary for CJS model
## Name : Phi(~age + tail)p(~precip)
##
## Npar :  5
## -2lnL:  2178.574
## AICc :  2188.631
##
## Beta
##                   estimate        se        lcl        ucl
## Phi:(Intercept)  0.2019063 0.5510543 -0.8781601  1.2819727
## Phi:age[1,6]     1.6796106 0.3334565  1.0260360  2.3331853
## Phi:tail         0.0213746 0.0291133 -0.0356874  0.0784366
## p:(Intercept)   -1.4350950 0.2061509 -1.8391509 -1.0310392
## p:precip         0.3741405 0.1420270  0.0957675  0.6525134
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.6400361 0.9050923 0.9050923 0.9050923 0.9050923
## 2           0.6400361 0.9050923 0.9050923 0.9050923
## 3                     0.6400361 0.9050923 0.9050923
## 4                               0.6400361 0.9050923
## 5                                         0.6400361
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.9050923 0.9050923 0.9050923 0.9050923 0.9050923
## 2           0.9050923 0.9050923 0.9050923 0.9050923
## 3                     0.9050923 0.9050923 0.9050923
## 4                               0.9050923 0.9050923
## 5                                         0.9050923
##
##
## Real Parameter p
## Group:agejuv
##           2         3        4         5         6
## 1 0.1987796 0.2852063 0.265796 0.3007029 0.3239994
## 2           0.2852063 0.265796 0.3007029 0.3239994
## 3                     0.265796 0.3007029 0.3239994
## 4                              0.3007029 0.3239994
## 5                                        0.3239994
##
## Group:ageolder
##           2         3        4         5         6
## 1 0.1987796 0.2852063 0.265796 0.3007029 0.3239994
## 2           0.2852063 0.265796 0.3007029 0.3239994
## 3                     0.265796 0.3007029 0.3239994
## 4                              0.3007029 0.3239994
## 5                                        0.3239994
##
## Phi.age.tail.sq.p.precip
##
## Output summary for CJS model
## Name : Phi(~age + tail + tail.sq)p(~precip)
##
## Npar :  6
## -2lnL:  2167.932
## AICc :  2180.012
##
## Beta
##                   estimate        se        lcl        ucl
## Phi:(Intercept) -5.9658156 2.0235423 -9.9319585 -1.9996727
## Phi:age[1,6]     1.7772673 0.3501030  1.0910653  2.4634693
## Phi:tail         0.7745215 0.2456306  0.2930856  1.2559575
## Phi:tail.sq     -0.0214688 0.0069674 -0.0351248 -0.0078127
## p:(Intercept)   -1.4177717 0.2056497 -1.8208452 -1.0146982
## p:precip         0.3559452 0.1414734  0.0786573  0.6332330
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.6401238 0.9131858 0.9131858 0.9131858 0.9131858
## 2           0.6401238 0.9131858 0.9131858 0.9131858
## 3                     0.6401238 0.9131858 0.9131858
## 4                               0.6401238 0.9131858
## 5                                         0.6401238
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.9131858 0.9131858 0.9131858 0.9131858 0.9131858
## 2           0.9131858 0.9131858 0.9131858 0.9131858
## 3                     0.9131858 0.9131858 0.9131858
## 4                               0.9131858 0.9131858
## 5                                         0.9131858
##
##
## Real Parameter p
## Group:agejuv
##           2         3         4         5         6
## 1 0.2012311 0.2836216 0.2652002 0.2983058 0.3203521
## 2           0.2836216 0.2652002 0.2983058 0.3203521
## 3                     0.2652002 0.2983058 0.3203521
## 4                               0.2983058 0.3203521
## 5                                         0.3203521
##
## Group:ageolder
##           2         3         4         5         6
## 1 0.2012311 0.2836216 0.2652002 0.2983058 0.3203521
## 2           0.2836216 0.2652002 0.2983058 0.3203521
## 3                     0.2652002 0.2983058 0.3203521
## 4                               0.2983058 0.3203521
## 5                                         0.3203521
##
## Phi.dot.p.precip
##
## Output summary for CJS model
## Name : Phi(~1)p(~precip)
##
## Npar :  3
## -2lnL:  2200.961
## AICc :  2206.983
##
## Beta
##                   estimate        se        lcl        ucl
## Phi:(Intercept)  1.8756740 0.2073306  1.4693060  2.2820419
## p:(Intercept)   -1.5951476 0.2017074 -1.9904941 -1.1998011
## p:precip         0.4149045 0.1396750  0.1411415  0.6886674
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.8671134 0.8671134 0.8671134 0.8671134 0.8671134
## 2           0.8671134 0.8671134 0.8671134 0.8671134
## 3                     0.8671134 0.8671134 0.8671134
## 4                               0.8671134 0.8671134
## 5                                         0.8671134
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.8671134 0.8671134 0.8671134 0.8671134 0.8671134
## 2           0.8671134 0.8671134 0.8671134 0.8671134
## 3                     0.8671134 0.8671134 0.8671134
## 4                               0.8671134 0.8671134
## 5                                         0.8671134
##
##
## Real Parameter p
## Group:agejuv
##           2         3         4         5         6
## 1 0.1751573 0.2645253 0.2440772 0.2809814 0.3059173
## 2           0.2645253 0.2440772 0.2809814 0.3059173
## 3                     0.2440772 0.2809814 0.3059173
## 4                               0.2809814 0.3059173
## 5                                         0.3059173
##
## Group:ageolder
##           2         3         4         5         6
## 1 0.1751573 0.2645253 0.2440772 0.2809814 0.3059173
## 2           0.2645253 0.2440772 0.2809814 0.3059173
## 3                     0.2440772 0.2809814 0.3059173
## 4                               0.2809814 0.3059173
## 5                                         0.3059173
##
## Phi.age.p.time
##
## Output summary for CJS model
## Name : Phi(~age)p(~-1 + time)
##
## Npar :  7
## -2lnL:  2172.442
## AICc :  2186.549
##
## Beta
##                   estimate        se        lcl        ucl
## Phi:(Intercept)  0.5810684 0.2077221  0.1739330  0.9882038
## Phi:age[1,6]     1.7358842 0.3495131  1.0508386  2.4209298
## p:time2         -1.5648782 0.2511311 -2.0570951 -1.0726613
## p:time3         -0.9339069 0.1602830 -1.2480617 -0.6197521
## p:time4         -1.0213624 0.1423085 -1.3002871 -0.7424376
## p:time5         -0.6450328 0.1383838 -0.9162651 -0.3738006
## p:time6         -0.9045854 0.1414412 -1.1818103 -0.6273606
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.6413132 0.9102713 0.9102713 0.9102713 0.9102713
## 2           0.6413132 0.9102713 0.9102713 0.9102713
## 3                     0.6413132 0.9102713 0.9102713
## 4                               0.6413132 0.9102713
## 5                                         0.6413132
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.9102713 0.9102713 0.9102713 0.9102713 0.9102713
## 2           0.9102713 0.9102713 0.9102713 0.9102713
## 3                     0.9102713 0.9102713 0.9102713
## 4                               0.9102713 0.9102713
## 5                                         0.9102713
##
##
## Real Parameter p
## Group:agejuv
##           2         3         4         5         6
## 1 0.1729478 0.2821328 0.2647621 0.3441098 0.2881091
## 2           0.2821328 0.2647621 0.3441098 0.2881091
## 3                     0.2647621 0.3441098 0.2881091
## 4                               0.3441098 0.2881091
## 5                                         0.2881091
##
## Group:ageolder
##           2         3         4         5         6
## 1 0.1729478 0.2821328 0.2647621 0.3441098 0.2881091
## 2           0.2821328 0.2647621 0.3441098 0.2881091
## 3                     0.2647621 0.3441098 0.2881091
## 4                               0.3441098 0.2881091
## 5                                         0.2881091
##
## Phi.age.birth.p.time
##
## Output summary for CJS model
## Name : Phi(~age + birth)p(~-1 + time)
##
## Npar :  8
## -2lnL:  2169.773
## AICc :  2185.911
##
## Beta
##                   estimate        se        lcl        ucl
## Phi:(Intercept)  1.6803385 0.7353355  0.2390808  3.1215962
## Phi:age[1,6]     1.6569443 0.3403175  0.9899219  2.3239666
## Phi:birth       -0.0471390 0.0292421 -0.1044535  0.0101755
## p:time2         -1.5607732 0.2512738 -2.0532698 -1.0682765
## p:time3         -0.9287182 0.1602301 -1.2427693 -0.6146672
## p:time4         -1.0193522 0.1419337 -1.2975422 -0.7411622
## p:time5         -0.6389728 0.1374340 -0.9083434 -0.3696022
## p:time6         -0.8979978 0.1399847 -1.1723678 -0.6236277
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.6510457 0.9072561 0.9072561 0.9072561 0.9072561
## 2           0.6510457 0.9072561 0.9072561 0.9072561
## 3                     0.6510457 0.9072561 0.9072561
## 4                               0.6510457 0.9072561
## 5                                         0.6510457
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.9072561 0.9072561 0.9072561 0.9072561 0.9072561
## 2           0.9072561 0.9072561 0.9072561 0.9072561
## 3                     0.9072561 0.9072561 0.9072561
## 4                               0.9072561 0.9072561
## 5                                         0.9072561
##
##
## Real Parameter p
## Group:agejuv
##           2         3         4         5         6
## 1 0.1735357 0.2831848 0.2651536 0.3454788 0.2894621
## 2           0.2831848 0.2651536 0.3454788 0.2894621
## 3                     0.2651536 0.3454788 0.2894621
## 4                               0.3454788 0.2894621
## 5                                         0.2894621
##
## Group:ageolder
##           2         3         4         5         6
## 1 0.1735357 0.2831848 0.2651536 0.3454788 0.2894621
## 2           0.2831848 0.2651536 0.3454788 0.2894621
## 3                     0.2651536 0.3454788 0.2894621
## 4                               0.3454788 0.2894621
## 5                                         0.2894621
##
## Phi.age.birth.tail.p.time
##
## Output summary for CJS model
## Name : Phi(~age + birth + tail)p(~-1 + time)
##
## Npar :  9
## -2lnL:  2168.845
## AICc :  2187.017
##
## Beta
##                   estimate        se        lcl        ucl
## Phi:(Intercept)  1.2375183 0.8430454 -0.4148507  2.8898872
## Phi:age[1,6]     1.6313583 0.3303989  0.9837764  2.2789402
## Phi:birth       -0.0501287 0.0292196 -0.1073992  0.0071417
## Phi:tail         0.0287647 0.0296592 -0.0293674  0.0868968
## p:time2         -1.5596560 0.2513896 -2.0523795 -1.0669325
## p:time3         -0.9258463 0.1603739 -1.2401791 -0.6115136
## p:time4         -1.0117521 0.1420098 -1.2900913 -0.7334129
## p:time5         -0.6258509 0.1374759 -0.8953037 -0.3563982
## p:time6         -0.8849180 0.1395781 -1.1584911 -0.6113450
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.6494418 0.9044731 0.9044731 0.9044731 0.9044731
## 2           0.6494418 0.9044731 0.9044731 0.9044731
## 3                     0.6494418 0.9044731 0.9044731
## 4                               0.6494418 0.9044731
## 5                                         0.6494418
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.9044731 0.9044731 0.9044731 0.9044731 0.9044731
## 2           0.9044731 0.9044731 0.9044731 0.9044731
## 3                     0.9044731 0.9044731 0.9044731
## 4                               0.9044731 0.9044731
## 5                                         0.9044731
##
##
## Real Parameter p
## Group:agejuv
##          2         3         4         5         6
## 1 0.173696 0.2837682 0.2666371 0.3484519 0.2921597
## 2          0.2837682 0.2666371 0.3484519 0.2921597
## 3                    0.2666371 0.3484519 0.2921597
## 4                              0.3484519 0.2921597
## 5                                        0.2921597
##
## Group:ageolder
##          2         3         4         5         6
## 1 0.173696 0.2837682 0.2666371 0.3484519 0.2921597
## 2          0.2837682 0.2666371 0.3484519 0.2921597
## 3                    0.2666371 0.3484519 0.2921597
## 4                              0.3484519 0.2921597
## 5                                        0.2921597
##
## Phi.age.birth.tail.sq.p.time
##
## Output summary for CJS model
## Name : Phi(~age + birth + tail + tail.sq)p(~-1 + time)
##
## Npar :  10
## -2lnL:  2157.187
## AICc :  2177.398
##
## Beta
##                   estimate        se        lcl           ucl
## Phi:(Intercept) -5.0927900 2.0441283 -9.0992816 -1.0862984000
## Phi:age[1,6]     1.7131736 0.3428982  1.0410930  2.3852541000
## Phi:birth       -0.0587077 0.0300232 -0.1175531  0.0001377502
## Phi:tail         0.8260532 0.2494577  0.3371161  1.3149904000
## Phi:tail.sq     -0.0227242 0.0070620 -0.0365657 -0.0088828000
## p:time2         -1.5479843 0.2514709 -2.0408672 -1.0551014000
## p:time3         -0.9237405 0.1602830 -1.2378952 -0.6095859000
## p:time4         -1.0146898 0.1418154 -1.2926479 -0.7367316000
## p:time5         -0.6364805 0.1367337 -0.9044785 -0.3684824000
## p:time6         -0.9013689 0.1383831 -1.1725998 -0.6301379000
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.6512416 0.9119495 0.9119495 0.9119495 0.9119495
## 2           0.6512416 0.9119495 0.9119495 0.9119495
## 3                     0.6512416 0.9119495 0.9119495
## 4                               0.6512416 0.9119495
## 5                                         0.6512416
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.9119495 0.9119495 0.9119495 0.9119495 0.9119495
## 2           0.9119495 0.9119495 0.9119495 0.9119495
## 3                     0.9119495 0.9119495 0.9119495
## 4                               0.9119495 0.9119495
## 5                                         0.9119495
##
##
## Real Parameter p
## Group:agejuv
##           2         3         4         5         6
## 1 0.1753776 0.2841963 0.2660631 0.3460426 0.2887693
## 2           0.2841963 0.2660631 0.3460426 0.2887693
## 3                     0.2660631 0.3460426 0.2887693
## 4                               0.3460426 0.2887693
## 5                                         0.2887693
##
## Group:ageolder
##           2         3         4         5         6
## 1 0.1753776 0.2841963 0.2660631 0.3460426 0.2887693
## 2           0.2841963 0.2660631 0.3460426 0.2887693
## 3                     0.2660631 0.3460426 0.2887693
## 4                               0.3460426 0.2887693
## 5                                         0.2887693
##
## Phi.age.tail.p.time
##
## Output summary for CJS model
## Name : Phi(~age + tail)p(~-1 + time)
##
## Npar :  8
## -2lnL:  2171.878
## AICc :  2188.016
##
## Beta
##                   estimate        se        lcl        ucl
## Phi:(Intercept)  0.1826811 0.5545395 -0.9042164  1.2695786
## Phi:age[1,6]     1.7157495 0.3392964  1.0507285  2.3807705
## Phi:tail         0.0222556 0.0293665 -0.0353027  0.0798139
## p:time2         -1.5637197 0.2512220 -2.0561148 -1.0713247
## p:time3         -0.9310193 0.1603589 -1.2453227 -0.6167158
## p:time4         -1.0143326 0.1423370 -1.2933130 -0.7353521
## p:time5         -0.6334409 0.1383822 -0.9046700 -0.3622118
## p:time6         -0.8928490 0.1410487 -1.1693045 -0.6163935
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.6391539 0.9078317 0.9078317 0.9078317 0.9078317
## 2           0.6391539 0.9078317 0.9078317 0.9078317
## 3                     0.6391539 0.9078317 0.9078317
## 4                               0.6391539 0.9078317
## 5                                         0.6391539
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.9078317 0.9078317 0.9078317 0.9078317 0.9078317
## 2           0.9078317 0.9078317 0.9078317 0.9078317
## 3                     0.9078317 0.9078317 0.9078317
## 4                               0.9078317 0.9078317
## 5                                         0.9078317
##
##
## Real Parameter p
## Group:agejuv
##           2        3         4         5         6
## 1 0.1731135 0.282718 0.2661328 0.3467307 0.2905222
## 2           0.282718 0.2661328 0.3467307 0.2905222
## 3                    0.2661328 0.3467307 0.2905222
## 4                              0.3467307 0.2905222
## 5                                        0.2905222
##
## Group:ageolder
##           2        3         4         5         6
## 1 0.1731135 0.282718 0.2661328 0.3467307 0.2905222
## 2           0.282718 0.2661328 0.3467307 0.2905222
## 3                    0.2661328 0.3467307 0.2905222
## 4                              0.3467307 0.2905222
## 5                                        0.2905222
##
## Phi.age.tail.sq.p.time
##
## Output summary for CJS model
## Name : Phi(~age + tail + tail.sq)p(~-1 + time)
##
## Npar :  9
## -2lnL:  2161.168
## AICc :  2179.341
##
## Beta
##                   estimate        se         lcl        ucl
## Phi:(Intercept) -6.0460045 2.0409139 -10.0461960 -2.0458132
## Phi:age[1,6]     1.8149999 0.3561472   1.1169513  2.5130485
## Phi:tail         0.7829781 0.2478430   0.2972059  1.2687504
## Phi:tail.sq     -0.0216863 0.0070310  -0.0354671 -0.0079055
## p:time2         -1.5532375 0.2512630  -2.0457130 -1.0607621
## p:time3         -0.9300766 0.1602493  -1.2441652 -0.6159881
## p:time4         -1.0185860 0.1421402  -1.2971807 -0.7399913
## p:time5         -0.6458697 0.1375829  -0.9155322 -0.3762072
## p:time6         -0.9107972 0.1397270  -1.1846621 -0.6369323
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.6393695 0.9158790 0.9158790 0.9158790 0.9158790
## 2           0.6393695 0.9158790 0.9158790 0.9158790
## 3                     0.6393695 0.9158790 0.9158790
## 4                               0.6393695 0.9158790
## 5                                         0.6393695
##
## Group:ageolder
##          1        2        3        4        5
## 1 0.915879 0.915879 0.915879 0.915879 0.915879
## 2          0.915879 0.915879 0.915879 0.915879
## 3                   0.915879 0.915879 0.915879
## 4                            0.915879 0.915879
## 5                                     0.915879
##
##
## Real Parameter p
## Group:agejuv
##           2         3         4         5         6
## 1 0.1746192 0.2829092 0.2653029 0.3439209 0.2868367
## 2           0.2829092 0.2653029 0.3439209 0.2868367
## 3                     0.2653029 0.3439209 0.2868367
## 4                               0.3439209 0.2868367
## 5                                         0.2868367
##
## Group:ageolder
##           2         3         4         5         6
## 1 0.1746192 0.2829092 0.2653029 0.3439209 0.2868367
## 2           0.2829092 0.2653029 0.3439209 0.2868367
## 3                     0.2653029 0.3439209 0.2868367
## 4                               0.3439209 0.2868367
## 5                                         0.2868367
##
## Phi.dot.p.time
##
## Output summary for CJS model
## Name : Phi(~1)p(~-1 + time)
##
## Npar :  6
## -2lnL:  2195.052
## AICc :  2207.132
##
## Beta
##                   estimate        se       lcl        ucl
## Phi:(Intercept)  1.8882523 0.2110171  1.474659  2.3018459
## p:time2         -1.6958572 0.2472842 -2.180534 -1.2111801
## p:time3         -1.0688695 0.1566973 -1.375996 -0.7617429
## p:time4         -1.1238157 0.1407573 -1.399700 -0.8479313
## p:time5         -0.7401474 0.1364025 -1.007496 -0.4727985
## p:time6         -0.9582791 0.1417113 -1.236033 -0.6805250
##
##
## Real Parameter Phi
## Group:agejuv
##           1         2         3         4         5
## 1 0.8685561 0.8685561 0.8685561 0.8685561 0.8685561
## 2           0.8685561 0.8685561 0.8685561 0.8685561
## 3                     0.8685561 0.8685561 0.8685561
## 4                               0.8685561 0.8685561
## 5                                         0.8685561
##
## Group:ageolder
##           1         2         3         4         5
## 1 0.8685561 0.8685561 0.8685561 0.8685561 0.8685561
## 2           0.8685561 0.8685561 0.8685561 0.8685561
## 3                     0.8685561 0.8685561 0.8685561
## 4                               0.8685561 0.8685561
## 5                                         0.8685561
##
##
## Real Parameter p
## Group:agejuv
##           2         3         4         5         6
## 1 0.1550071 0.2556181 0.2453042 0.3229719 0.2772229
## 2           0.2556181 0.2453042 0.3229719 0.2772229
## 3                     0.2453042 0.3229719 0.2772229
## 4                               0.3229719 0.2772229
## 5                                         0.2772229
##
## Group:ageolder
##           2         3         4         5         6
## 1 0.1550071 0.2556181 0.2453042 0.3229719 0.2772229
## 2           0.2556181 0.2453042 0.3229719 0.2772229
## 3                     0.2453042 0.3229719 0.2772229
## 4                               0.3229719 0.2772229
## 5                                         0.2772229
sq.res
##                                              model npar     AICc
## 9  Phi(~age + birth + tail + tail.sq)p(~-1 + time)   10 2177.398
## 8     Phi(~age + birth + tail + tail.sq)p(~precip)    7 2178.057
## 18         Phi(~age + tail + tail.sq)p(~-1 + time)    9 2179.341
## 17            Phi(~age + tail + tail.sq)p(~precip)    6 2180.012
## 7          Phi(~age + birth + tail + tail.sq)p(~1)    6 2182.923
## 16                 Phi(~age + tail + tail.sq)p(~1)    5 2184.725
## 3                   Phi(~age + birth)p(~-1 + time)    8 2185.911
## 2                      Phi(~age + birth)p(~precip)    5 2186.472
## 12                          Phi(~age)p(~-1 + time)    7 2186.549
## 6            Phi(~age + birth + tail)p(~-1 + time)    9 2187.017
## 11                             Phi(~age)p(~precip)    4 2187.142
## 5               Phi(~age + birth + tail)p(~precip)    6 2187.612
## 15                   Phi(~age + tail)p(~-1 + time)    8 2188.016
## 14                      Phi(~age + tail)p(~precip)    5 2188.631
## 1                           Phi(~age + birth)p(~1)    4 2191.720
## 10                                  Phi(~age)p(~1)    3 2192.278
## 4                    Phi(~age + birth + tail)p(~1)    5 2193.147
## 13                           Phi(~age + tail)p(~1)    4 2194.007
## 20                               Phi(~1)p(~precip)    3 2206.983
## 21                            Phi(~1)p(~-1 + time)    6 2207.132
## 19                                    Phi(~1)p(~1)    2 2214.503
##     DeltaAICc       weight  Deviance
## 9   0.0000000 3.960075e-01 2157.1874
## 8   0.6584446 2.849207e-01 2163.9497
## 18  1.9422838 1.499484e-01 2161.1682
## 17  2.6137992 1.071826e-01 2167.9319
## 7   5.5247992 2.500394e-02 2170.8429
## 16  7.3269219 1.015506e-02 2174.6680
## 3   8.5127690 5.612794e-03 2169.7733
## 2   9.0734219 4.240674e-03 2176.4145
## 12  9.1508446 4.079649e-03  138.7836
## 6   9.6187838 3.228576e-03 2168.8447
## 11  9.7440015 3.032637e-03  145.4457
## 5  10.2131992 2.398476e-03 2175.5313
## 15 10.6176690 1.959322e-03 2171.8782
## 14 11.2325219 1.440762e-03 2178.5736
## 1  14.3221015 3.073963e-04 2183.6823
## 10 14.8798271 2.325894e-04  152.5968
## 4  15.7483219 1.506603e-04 2183.0894
## 13 16.6085015 9.799708e-05 2185.9687
## 20 29.5850271 1.490721e-07  167.3020
## 21 29.7338992 1.383787e-07  161.3935
## 19 37.1041877 3.472413e-09  176.8326
names(sq.res)
##  [1] "Phi.age.birth.p.dot"            "Phi.age.birth.p.precip"
##  [3] "Phi.age.birth.p.time"           "Phi.age.birth.tail.p.dot"
##  [5] "Phi.age.birth.tail.p.precip"    "Phi.age.birth.tail.p.time"
##  [7] "Phi.age.birth.tail.sq.p.dot"    "Phi.age.birth.tail.sq.p.precip"
##  [9] "Phi.age.birth.tail.sq.p.time"   "Phi.age.p.dot"
## [11] "Phi.age.p.precip"               "Phi.age.p.time"
## [13] "Phi.age.tail.p.dot"             "Phi.age.tail.p.precip"
## [15] "Phi.age.tail.p.time"            "Phi.age.tail.sq.p.dot"
## [17] "Phi.age.tail.sq.p.precip"       "Phi.age.tail.sq.p.time"
## [19] "Phi.dot.p.dot"                  "Phi.dot.p.precip"
## [21] "Phi.dot.p.time"                 "model.table"

top <- sq.res$Phi.age.birth.tail.sq.p.time top$results$beta ## estimate se lcl ucl ## Phi:(Intercept) -5.0927900 2.0441283 -9.0992816 -1.0862984000 ## Phi:age[1,6] 1.7131736 0.3428982 1.0410930 2.3852541000 ## Phi:birth -0.0587077 0.0300232 -0.1175531 0.0001377502 ## Phi:tail 0.8260532 0.2494577 0.3371161 1.3149904000 ## Phi:tail.sq -0.0227242 0.0070620 -0.0365657 -0.0088828000 ## p:time2 -1.5479843 0.2514709 -2.0408672 -1.0551014000 ## p:time3 -0.9237405 0.1602830 -1.2378952 -0.6095859000 ## p:time4 -1.0146898 0.1418154 -1.2926479 -0.7367316000 ## p:time5 -0.6364805 0.1367337 -0.9044785 -0.3684824000 ## p:time6 -0.9013689 0.1383831 -1.1725998 -0.6301379000 ## Make Predictions for $$\phi$$ from Top Model min.tail <- min(sq$tail)
max.tail <- max(sq$tail) tail.values <- seq(from = min.tail, to = max.tail, by = 0.25) birth.values <- c(quantile(sq$birth, 0.05),
mean(sq$birth), quantile(sq$birth, 0.95))
pred.dat <- expand.grid(birth = birth.values,
tail = tail.values)
pred.dat$tail.sq <- pred.dat$tail^2

# make predictions for rows of 'sq.ddl' associated with juveniles,
# i.e., (par.index=1, 2) = a juvenile and an adult
pred.top <- covariate.predictions(top, data = pred.dat, indices = c(1, 2))

# view head of the prediction data.frame
head(pred.top$estimates) ## vcv.index model.index par.index birth tail tail.sq estimate ## 1 1 1 1 15.50000 10 100 0.4963382 ## 2 2 2 2 15.50000 10 100 0.8453422 ## 3 3 1 1 22.41667 10 100 0.3963471 ## 4 4 2 2 22.41667 10 100 0.7845641 ## 5 5 1 1 29.50000 10 100 0.3022608 ## 6 6 2 2 29.50000 10 100 0.7061210 ## se lcl ucl fixed ## 1 0.10138297 0.3079901 0.6857314 ## 2 0.05095075 0.7180251 0.9214611 ## 3 0.08572080 0.2454666 0.5699191 ## 4 0.05835719 0.6492519 0.8775227 ## 5 0.08966914 0.1584377 0.4991971 ## 6 0.08684269 0.5140905 0.8451242 ### Plot phi versus tail length: make the plot Here, you can see how to make the plot using the ‘ggplot2’ package pred = pred.top$estimates
# use parameter index to create age_class variable
pred$age_class = ifelse(pred$par.index == 1, "juv", "older")
# Store information on birth date values
pred$birthdate = ifelse(pred$birth == mean(sq$birth), "b - bd_avg", ifelse(pred$birth == quantile(sq\$birth, 0.05), "a - bd_.05",
"c - bd_.95"))
# build and store the plot in object 'p'
ggplot(pred, aes(x = tail, y = estimate, group = age_class)) +
geom_line(aes(color = age_class), size = 1.5) +
geom_ribbon(aes(ymin = lcl, ymax = ucl), alpha = 0.2) +
xlab("Tail Length") + ylab("Apparent Survival Rate") +
ylim(0, 1) + facet_wrap( ~ birthdate) +
theme(legend.position="top")

### Clean up files created

# if you're running this code, it's wise to cleanup files
# you can use the next 2 lines without comments to do that

#rm(list=ls(all=TRUE))

#cleanup(ask = FALSE)