View source: R/basF.R View source: R/AF.Echidna.R
Var.esR | R Documentation |
Var
This function output Variance components for R packages.
## S3 method for class 'esR'
Var(object)
Var(object, ...)
## S3 method for class 'lme'
Var(object)
## S3 method for class 'lmerMod'
Var(object)
## S3 method for class 'asreml'
Var(object)
## S3 method for class 'remlf90'
Var(object, mulT = FALSE)
object |
an object of mixed model results from R packages. |
mulT |
multi-trait model(default, FALSE). |
Output Variance component for mixed model results from R packages.
the result is returned directly.
Yuanzhen Lin <yzhlinscau@163.com>
AFfR website:https://github.com/yzhlinscau/AFfR
library(AFEchidna)
## 00 data
data(butron.maize,package='agridat')
df<-butron.maize
## 01 nlme package
library(nlme) # V3.1-131
nlm<-lme(yield~1+env,random=~1|male/female,
na.action='na.omit',
data=df)
Var(nlm)
## 02 lme4 package
library(lme4) # V1.1-17
lme<-lmer(yield~1+env+(1|male)+(1|female),
data=df)
Var(lme)
## Not run:
## 03 breedR package
library(breedR) # V0.12-1
bdR <- remlf90(fixed = yield~1+env,
random = ~ male+female,
data=df)
Var(bdR)
## 04 asreml package
library(asreml) #V3.0
asr <- asreml(fixed = yield~1+env,
random = ~ male+female,
na.method.X='include',
data=df)
Var(asr)
##### special for breedR
library(breedR)
data(globulus)
res.animal <- remlf90(fixed = phe_X ~ 1,
random = ~ gg,
genetic = list(model = 'add_animal',
pedigree = globulus[, 1:3],
id = 'self'),
data = globulus)
Var(res.animal)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.