Description Usage Arguments Details Value Author(s) References See Also Examples
The function creates an n times n matrix, each row of the matrix replicating Legendre polynomials for the corresponding value
of the re-scaled age vector the length of which is n. This function is a subfunction of IDM
.
1 | psii(adjusted_age)
|
adjusted_age |
The vector of ages scaled to range from -1 to 1. |
For further details, see Kirkpatrick et al. 1990.
A n times n matrix of Legendre polynomials, value replicated at each row being the polynomials at the corresponding age.
Anna Kuparinen and Mats Bj<f6>rklund
Kirkpatrick M, Lofsvold D, Bulmer M (1990) Analysis of the inheritance, selection and evolution of growth trajectories. Genetics 124:979-993.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # The function is defined as
function(adjusted_age){
n=length(adjusted_age)
adjust_temp=rep(adjusted_age,each=n)
j_temp=rep(0:(n-1),n)
psii_elements=rep(NA,n*n)
for(i in 1:(n*n)){
psii_elements[i]=p.function(j=j_temp[i],x=adjust_temp[i])
}
psii_temp=matrix(psii_elements,byrow=T,nrow=n,ncol=n)
return(psii_temp)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.