nfs | R Documentation |
nfs
is a function which estimates the temporal covariance matrix
and the temporal mean alpha coefficients (i.e. directional
selection) under the assumption of no fluctuating selection.
nfs(At, at, npar, nyear)
At |
a list containing the named yearly variance-covariance matrices. Sorted by year. |
at |
a list containing the named yearly vectors of the estimated selection coefficients. Sorted by year. |
npar |
the number of parameters in the model for the estimates selection coefficients. |
nyear |
the number of years with estimates of selection. |
nfs
is used internally in lmf
when estimating temporal mean
coefficients of selection under the assumption of no fluctuating selection, but
given the right data can be executed as a standalone. The input to the
arguments At and at are estimated within lmf
by correctly combining
estimates of coefficients and variance-covariance within each age class and year
to a estimate for each year.
Engen et al. 2012 describe the method in details.
nfs
returns a list containing the following components:
Anf |
the estimated temporal covariance matrix under the assumption of no flucutating selection. |
anf |
the estimated temporal mean selection coefficients under the assumption of no fluctuating selection. |
Thomas Kvalnes
Engen, S., Saether, B.-E., Kvalnes, T. and Jensen, H. 2012. Estimating fluctuating selection in age-structured populations. Journal of Evolutionary Biology, 25, 1487-1499.
lmf
, fs
#Data set from Engen et al. 2012 data(sparrowdata) #Fit model lmf.1 <- lmf(formula = cbind(recruits, survival) ~ weight + tars, age = age, year = year, data = sparrowdata) #Extract At and at At <- lmf.1$At at <- lmf.1$at #Estimate temporal selection coefficients under the assumption of no #fluctuating selection noflusel <- nfs(At = At, at = at, npar = 3, nyear = 7) #View output str(noflusel) noflusel
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.