Extract predictions of the genotypic value from an object of class
fitMod
.
getGenoPred(
fitMod,
timePoints = names(fitMod),
predictChecks = FALSE,
outFile = NULL
)
A list of two data.frames with predicted genotypic values per time
point. genoPred
with the predicted values for the genotypes and
checkPred
with the predicted values for the checks. If
predictChecks = FALSE
the latter will be NULL
.
An object of class fitMod
.
A character or numeric vector indicating the time point(s) for which the predictions should be extracted. When using a character string to reference a time point, the value has to be an exact match to one of the existing time points. When using a number it will be matched by its number ("timeNumber") in the timePoints attribute of the TP object.
Should predictions of the check genotypes be included
in the ouptut. If TRUE
a list of two data.frames
is returned
from the function, one with the predictions for the regular genotypes and
one with the predictions for the checks.
A character string indicating the .csv file to which the
results should be written. If NULL
no file is written.
Other functions for spatial modeling:
fitModels()
,
getCorrected()
,
getEffDims()
,
getHerit()
,
getVar()
,
plot.fitMod()
,
summary.fitMod()
## Using the first example dataset (PhenovatorDat1).
# \donttest{
phenoTP <- createTimePoints(dat = PhenovatorDat1,
experimentName = "Phenovator",
genotype = "Genotype",
timePoint = "timepoints",
repId = "Replicate",
plotId = "pos",
rowNum = "y", colNum = "x",
addCheck = TRUE,
checkGenotypes = c("check1", "check2",
"check3", "check4"))
## Fit a SpATS model on few time points.
modPhenoSp <- fitModels(TP = phenoTP,
trait = "EffpsII",
timePoints = c(1, 6, 20))
## Extract the genotypic predictions for one time point:
genoPredSp <- getGenoPred(modPhenoSp,
timePoints = 6)
head(genoPredSp)
# }
Run the code above in your browser using DataLab