getVar {statgenHTP} | R Documentation |
Extract variances
Description
Extract variances from an object of class fitMod.
Usage
getVar(fitMod, timePoints = names(fitMod), outFile = NULL)
Arguments
fitMod |
An object of class |
timePoints |
A character or numeric vector indicating the time point(s) for which the variances 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. |
outFile |
A character string indicating the .csv file to which the
results should be written. If |
Value
A data.frame with variances per time point.
See Also
Other functions for spatial modeling:
fitModels()
,
getCorrected()
,
getEffDims()
,
getGenoPred()
,
getHerit()
,
plot.fitMod()
,
summary.fitMod()
Examples
## Using the first example dataset (PhenovatorDat1):
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 variances for all available time points.
getVar(modPhenoSp)
[Package statgenHTP version 1.0.6.1 Index]