Description Usage Arguments Author(s) References See Also Examples
This function counts standard error(se) for heritability(h2) and corr value and also outputs significent level for corr value in ASReml-R package.
1 |
object |
asreml results |
formula |
formula for h2 or corr |
signif |
Index to output signif levels, F(default) for non-signif. |
corN |
Number of corr, 1(default). |
Rdf |
Index to output results to vector, F(default) for non-vector output. |
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 30 31 | library(asreml)
library(AAfun)
data(PrSpa)
df<-PrSpa
# exmaple 1 for sigle trait model
fm<-asreml(h5~1+Rep, random=~Fam, subset=Spacing=='3',data=df)
summary(fm)$varcomp[,1:3]
pin(fm, h2 ~4*V1/(V1+V2))
pin(fm, h2 ~4*V1/(V1+V2),Rdf=TRUE)
# exmaple 2 for us model
fm2<-asreml(cbind(dj,h5)~ trait+trait:Rep,
random=~ us(trait):Fam, rcov=~units:us(trait),
subset=Spacing=='3',data=df,maxit=40)
summary(fm2)$varcomp[,1:3]
pin(fm2, h2_A ~ 4 * V1/(V1+V5)) # heritability for trait A
pin(fm2, h2_B ~ 4 * V3/(V3+V7)) # heritability for trait B
pin(fm2, gCORR ~ V2/sqrt(V1*V3),signif=T) # genetic corr
pin(fm2, pCORR ~ (V2+V6)/sqrt((V1+V5)*(V3+V7)),signif=T) # phenotype corr
# exmaple 3 for corr model
fm3<-asreml(cbind(dj,h3,h5)~ trait+trait:Rep,
random=~ corgh(trait):Fam, rcov=~units:us(trait),
subset=Spacing=='3',data=df,maxit=40)
summary(fm3)$varcomp[,1:3]
pin(fm3,corN=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.