env_kernel | R Documentation |
Returns environmental kinships for reaction norm models. Output is a list containing the objects varCov kinship for environmental variables and envCov kinshp for environmental relatedness.
env_kernel(
env.data,
Y = NULL,
is.scaled = TRUE,
sd.tol = 1,
digits = 5,
tol = 0.001,
merge = FALSE,
Z_E = NULL,
stages = NULL,
env.id = "env",
gaussian = FALSE,
h.gaussian = NULL
)
env.data |
matrix. Data from environmental variables (or markers) per environment (or combinations of genotype-environment). |
Y |
data.frame. Phenotypic data set containing environment id, genotype id and trait value. |
is.scaled |
boolean. If environmental data is mean-centered and scaled (default = TRUE), assuming x~N(0,1). |
sd.tol |
numeric. Maximum standard deviation value for quality control. Coluns above this value are eliminated. |
digits |
numeric. Number of digits for round (default is 5) |
tol |
numeric. Value of tolerance (default = 0.001). |
merge |
boolean. if TRUE, the environmental covariables are merged with Y to build a n x n dimension env.kernel. |
Z_E |
matrix. NULL by default. is the model.matrix for environments (if merge = TRUE) |
stages |
vector of character names for each stage or time interval. Default is NULL. Is is.null(stages) = FALSE, the env_kernel will create different kernels for each development stage |
env.id |
character. Identification of experiment. |
gaussian |
boolean. If TRUE, uses the gaussian kernel parametrization for W, where envCov = exp(-h*d/q). |
h.gaussian |
numeric. If gaussian = TRUE, returns the h parameter for exp(-h*d/q). |
TODO
A list with environmental kinships for reaction norm models. Two matrices are produced. varCov with the distance for environmental covariables, and envCov with distances for genotypes.
Germano Costa Neto
W_matrix
## Not run:
### Loading the genomic, phenotype and weather data
data('maizeYield'); data("maizeWTH")
### getting the W matrix from weather data
W.cov <- W_matrix(env.data = maizeWTH)
### Parametrization by a linear kernel
env_kernel(env.data = W.cov,
Y = maizeYield,
merge = FALSE,
gaussian = FALSE)
### Parametrization by a nonlinear kernel (gaussian)
env_kernel(env.data = W.cov,
Y = maizeYield,
merge = FALSE,
gaussian = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.