perGeno | R Documentation |
.... These models can be fitted either for the original data, or on the residuals of a model with only main effects.
perGeno(
dat,
Y,
G,
E,
indices = NULL,
indicesData = NULL,
testEnv = NULL,
weight = NULL,
useRes = TRUE,
outputFile = NULL,
corType = c("pearson", "spearman"),
partition = data.frame(),
nfolds = 10,
alpha = 1,
scaling = c("train", "all", "no"),
quadratic = FALSE,
verbose = FALSE
)
dat |
A |
Y |
The trait to be analyzed: either of type character, in which case
it should be one of the column names in |
G |
The column in |
E |
The column in |
indices |
The columns in |
indicesData |
An optional |
testEnv |
vector (character). Data from these environments are not used
for fitting the model. Accuracy is evaluated for training and test
environments separately. The default is |
weight |
Numeric vector of length |
useRes |
Indicates whether the genotype-specific regressions are to be
fitted on the residuals of a model with main effects. If |
outputFile |
The file name of the output files, without .csv extension
which is added by the function. If not |
corType |
type of correlation: Pearson (default) or Spearman rank sum. |
partition |
|
nfolds |
Default |
alpha |
Type of penalty, as in glmnet (1 = LASSO, 0 = ridge; in between = elastic net). Default is 1. |
scaling |
determines how the environmental variables are scaled. "train" : all data (test and training environments) are scaled using the mean and and standard deviation in the training environments. "all" : using the mean and standard deviation of all environments. "no" : No scaling. |
quadratic |
boolean; default |
verbose |
boolean; default |
A list with the following elements:
Vector with predictions for the training set (to do: Add the factors genotype and environment; make a data.frame)
Vector with predictions for the test set (to do: Add the factors genotype and environment; make a data.frame). To do: add estimated environmental main effects, not only predicted environmental main effects
the estimated overall (grand) mean
The estimated environmental main effects, and the predicted effects, obtained when the former are regressed on the averaged indices, using penalized regression.
The predicted environmental main effects for the test environments, obtained from penalized regression using the estimated main effects for the training environments and the averaged indices.
data.frame containing the estimated genotypic main effects (first column) and sensitivities (subsequent columns)
a data.frame
with the accuracy (r) for each
test environment
a data.frame
with the accuracy (r) for each
training environment
a data.frame
with the accuracy (r) for
each genotype, averaged over the training environments
a data.frame
with the accuracy (r) for
each genotype, averaged over the test environments
The root mean squared error on the training environments
The root mean squared error on the test environments
The name of the trait that was predicted, i.e. the column name in dat that was used
The genotype label that was used, i.e. the argument G that was used
The environment label that was used, i.e. the argument E that was used
The indices that were used, i.e. the argument indices that was used
The quadratic option that was used
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.