# seed set
sf <- read_csv("seeds.csv")
names(sf)
## [1] "Site" "Year" "id" "area" "seeds"
# recruit sizes
rs <- read_csv("recruitsize.csv")
names(rs)
## [1] "site" "subpop" "id" "Status2017" "Status2018"
## [6] "Status2019" "area17" "surv18" "area19"
# size and height of flowering stalk
dh1 <- read_csv("DenHillData2014-2017May2020.csv")
names(dh1)
## [1] "year0" "site" "subpop" "id" "area14" "area15" "area16" "area17"
## [9] "ht14" "ht15" "ht16" "ht17"
Data organization and transformation happens….
names(dh2)
## [1] "y0" "site" "subpop" "id" "area" "areaNext"
## [7] "ht" "htNext" "logA" "logAp" "flower_p" "flower"
## [13] "surv"
Questions
Select the starting year, \(t\).
t0 <- 2014
dh <- filter(dh2, y0==t0 & !is.na(area))
names(dh)
## [1] "y0" "site" "subpop" "id" "area" "areaNext"
## [7] "ht" "htNext" "logA" "logAp" "flower_p" "flower"
## [13] "surv"
Survival of new recruits will be naturally lower because they are smaller, but we may want to go further and include one-time data on germination and survival. I show size-dependent survival both without and with transplant recruits.
The establishment probability is, I think, what we have from the seed baskets.
Size-dependent demography. ‘logA’ is the base-10 log of leaf area in the first year. ‘logAp’ is log-A prime, the base-10 log of area in the second year.
Size-dependent fecundity, and size-independent recruit probability and new recruit size distribution.
First we estimate something from data, then we use it to build functions.
I use code handed down on stone tablets from Ellner, Merow, and others.
The survival regression is a logistic regression of alive vs. log area.
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -2.334 0.962 -2.425 0.015
## logA 2.404 0.521 4.617 0.000
This may overestimate survival in the first year, or at the smallest stages. We could add a stage, which has different demographic rates, or we could re-estimate survival, using Rachael’s transplant data. I will try the latter here.
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -4.217 0.624 -6.763 0
## logA 3.404 0.359 9.487 0
It turns out that including the low recruit of the transplants about halves \(s(z)\) for the two smallest recruit sizes of 5 and 10, 0.14, 0.31 including transplant data vs. 0.34, 0.52 without transplant data.
The growth regression is a normal linear regression of log-area in year 2 vs. log-area in year 1, given individuals alive in both years. More complex models could be fine, but I bet we don’t have the pattern or the power to support any more complexity.
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.524 0.078 6.698 0
## logA 0.750 0.039 19.106 0
The standard deviation is will be used when we generate the distribution of the kernal.
With this population, I think we can estimate fecundity as the product of
The size-dependent flowering regression estimates the probability of flowering, given a particular size.
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -16.698 1.830 -9.126 0
## logA 6.765 0.817 8.276 0
The seeds per flowering head may be size-dependent, or not, if the data are too hard to come by. For now, we pretend the latter. Data from Rachael.
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 26.422 96.956 0.273 0.789
## logAs 39.185 44.283 0.885 0.389
The establishment probability is, I think, what we have from the seed baskets.
This establishment probability, pr=0.01 seems way too high for natural recruitment.
Now let’s make up a size distribution for new recruits. We get this from Rachael’s data, where all new seedlings were either 5 or 10 (cm^2?) (counts: 11, 25). We assume of normal distribution of log-area.
All using log-area.
# z is size in the first year
# zp is z prime, size in the second year
# 1. probability of surviving
# this is a logistic funcion
s.z=function(z,params) {
# calculate survival probability by
# backtransforming glm regression params
u=exp(params$surv.int+params$surv.slope*z)
s <- u/(1+u)
return(s)
}
# 2. growth function
# this is a normal distribution
g.zpz=function(zp,z,params) {
# describe the normal linear relation between size at t=0 vs. t=1.
# size(t+1) = y.intercept + slope*size(t) + e; e~N(0,sigma^2)
dnorm(zp,
mean=params$growth.int+params$growth.slope*z,
sd=params$growth.sd)
}
# 3. reproduction function
# this is a constant times a normal distribution times an exponential function
# size-dependent flowering probability
# seeds per flowering head (maybe size dependent)
# germination probability (seed baskets)
# survival of new recruits from germination to first census (I think this is wrapped into the germination data).
# size distribution of new recruits.
f.zpz=function(zp,z,params) {
# size-dep prob of flowering
1/(1+exp(- params$flowering.int - params$flowering.slope*z)) *
# size-dep number of seeds
(params$seed.int+params$seed.slope*z) *
# p(r), prob of recruitment (germination and establishment)
params$establishment.prob *
# distribution of sizes in the first year
dnorm(zp, mean=params$recruit.size.mean, sd=params$recruit.size.sd)
}
Relies on the Reimann sum, using midpoints. Increase \(n\) to decrease \(h\) and improve accuracy (but reduce speed).
The variable ‘y’ in the figures below is log10(Area).
This uses 2014 as the first year. [1] 0.9523511