Description Usage Arguments Value Author(s) References See Also Examples
This function would compare models with different random structure under the same fixed factors.
1 |
m1 |
Model 1 asreml results. |
m2 |
Model 2 asreml results. |
Nml |
A vector with more than 2 asreml results. |
mulM |
mulM is "TRUE" for a vector's comparison with multi-models, default (FALSE). |
LRT |
Value TRUE for Likelihood ratio test (LRT), default (FALSE) for no LRT. |
rdDF |
Value TRUE to control Ddf minus 0.5, default FALSE for LRT with Ddf. If TRUE, Ddf would minus 0.5, ie, Ddf=Ddf-0.5 . |
m1 |
An asreml result,such as "m1.asr" |
Nml |
A vector, such as "c(m1,m2,m3,m4)" |
Yuanzhen Lin <yzhlinscau@163.com>
Yuanzhen Lin. R & ASReml-R Statistics. China Forestry Publishing House. 2016
Website for instant update: yzhlin-asreml.ys168.com
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 | library(asreml)
library(AAfun)
df<-PrSpa
fm<-asreml(h5~ 1+Rep,random=~ Fam,
subset=Spacing=='3',data=df,maxit=40)
fm1a<-asreml(cbind(dj,h5)~ trait+trait:Rep,
random=~ us(trait):Fam, rcov=~units:us(trait),
subset=Spacing=='3',data=df,maxit=40)
fm1b<-asreml(cbind(dj,h5)~ trait+trait:Rep,
random=~ diag(trait):Fam, rcov=~units:us(trait),
subset=Spacing=='3',data=df,maxit=40)
fm3a<-asreml(cbind(dj,h3,h5)~ trait+trait:Rep,
random=~ diag(trait):Fam, rcov=~units:us(trait),
subset=Spacing=='3',data=df,maxit=40)
fm3b<-asreml(cbind(dj,h3,h5)~ trait+trait:Rep,
random=~ diag(trait):Fam, rcov=~units:us(trait),
subset=Spacing=='3',data=df,maxit=40)
##### model comparison #####
model.comp(m1=fm1a,m2=fm1b)
model.comp(m1=fm1a,m2=fm1b,LRT=TRUE)
model.comp(m1=fm1a,m2=fm1b,LRT=TRUE,rdDF=TRUE)
model.comp(Nml=c(fm3a,fm3b,fm1a,fm1b,fm),mulM=TRUE)
model.comp(Nml=c(fm3a,fm3b,fm1a,fm1b,fm),mulM=TRUE,LRT=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.