Var: Output variance components for R packages

Description Usage Arguments Details Value Author(s) References Examples

Description

Var This function Output variance components for R packages.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
Var(object, mulT)

## 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)

Arguments

object

an object of mixed model results from R packages.

mulT

multi-trait model(default, FALSE).

Details

Output variance component for mixed model results from R packages.

Value

the result is returned directly.

Author(s)

Yuanzhen Lin <yzhlinscau@163.com>

References

AAFMM website:https://github.com/yzhlinscau/AAFMM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
library(AAFMM)

## 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)
library(AAFMM)

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)

yzhlinscau/AAFMM documentation built on May 4, 2019, 4:17 a.m.