Forum | VSN International
http://forum.vsni.co.uk//
The forum for discussion of VSN International software and general statistical issuesenCopyright 2000-2010 VSN International Ltd.forumadmin@vsni.co.ukforumadmin@vsni.co.ukhttp://blogs.law.harvard.edu/tech/rss60Fri, 28 Feb 2020 17:43:35 GMTFri, 28 Feb 2020 17:43:35 GMThttp://www.vsni.co.uk/common/images/asreml145.gifForum | VSN International
http://forum.vsni.co.uk//
ASReml - RE: Spatial bivariate animal model
http://forum.vsni.co.uk/viewtopic.php?p=5575#5575
Hi, wondering if anyone knows how to specify trait specific spatial autocorrelation structures in a bivariate model, as a route to dealing with this? Something along the lines of the below (which doesn't work).
<br />
<br />
+ at(trait, 1):ar1v(col):ar1(row)
<br />
+ at(trait, 2):ar1v(col):ar1(row)ASRemlhttp://forum.vsni.co.uk//posting.php?mode=reply&t=1903srevansSun, 09 Feb 2020 23:31:01 GMThttp://forum.vsni.co.uk/viewtopic.php?p=5575#5575ASReml - DHGLM in ASReml 4.2
http://forum.vsni.co.uk/viewtopic.php?p=5574#5574
Is there new documentation on how to fit DHGLM in version 4.2? I found some documentation here:
<br />
<a href="https://niasra.uow.edu.au/content/groups/public/@web/@inf/@math/documents/mm/uow225970.pdf" target="_blank">https://niasra.uow.edu.au/content/groups/public/@web/@inf/@math/documents/mm/uow225970.pdf</a>
<br />
<br />
And also in the document “What's new in ASReml 4.2” dated November 2017 (Build 4.2 mv). But I am wondering if there is more elaborated examples and help for fitting DHGLM in ASReml 4.2. I am trying to run a DHGLM in which there are random intercept and slopes to the mean part of the model and only random intercept fitted to the dispersion part, with covariances fitted between all 3.
<br />
<br />
If this is the code to allow a covariance between mean and dispersion effects at sow level:
<br />
<span style="font-weight: bold">!HGLM HSection
<br />
LS dev(LS) ∼ Trait Trait.age !r us(Trait).nrm(sow)</span>
<br />
<br />
Then what would be the code to add a random slope according to age only to the mean part of the model, while estimating all of the covariances (i.e., a 3 x 3 co-variance matrix with intercept and slope variance fitted to the mean part and intercept variance fitted to the dispersion part)? Would that be the correct code?:
<br />
<span style="font-weight: bold">!HGLM HSection
<br />
LS dev(LS) ∼ Trait Trait.age !r us(Trait).nrm(sow) !r str(Trait.sow at(Trait,1).age.sow us(3).nrm(sow))
<br />
</span>ASRemlhttp://forum.vsni.co.uk//posting.php?mode=reply&t=1922vincent_careauWed, 29 Jan 2020 21:02:24 GMThttp://forum.vsni.co.uk/viewtopic.php?p=5574#5574ASReml - Hard crash with asreml r 4 on Windows 10
http://forum.vsni.co.uk/viewtopic.php?p=5558#5558
It looks like factor() in the call is causing a hard crash.
<br />
<br />
<div class="code">Code:<div class="inside_code">
<br />
library(asreml)
<br />
data(oats)
<br />
m0 <- asreml(yield ~ Variety + nrate, data=oats)
<br />
m0 <- asreml(yield ~ Variety + factor(nrate), data=oats)
<br />
# Process R exited abnormally with code 5 at Mon Dec 9 19:37:49 2019
<br />
utils::packageVersion("asreml")
<br />
# [1] '4.1.0.110'
<br />
<br />
</div></div>
<br />
<br />
Thanks, Kevin WrightASRemlhttp://forum.vsni.co.uk//posting.php?mode=reply&t=1921kwstatTue, 10 Dec 2019 02:11:17 GMThttp://forum.vsni.co.uk/viewtopic.php?p=5558#5558ASReml - Doubly multivariate analysis with ASREML-R 4.1
http://forum.vsni.co.uk/viewtopic.php?p=5557#5557
Good day:
<br />
<br />
I have a doubly multivariate dataset that consists of root length data at 4 depths, captured over time during two growing seasons. This is superimposed on a split-plot design where CO2 concentration is the main plot, and cultivar is the subplot. I have been able to analyse the aggregated root length over time, and I have analysed each date separately as a typical repeated measure with ASREML-R 4.1. However, it looks like the two cultivars do show differences in root length distribution over time, and I'm not capturing this with analyses over separate samplings. I would like to analyse this with the entire data set if possible.
<br />
<br />
Some of the issues I am running into is
<br />
1) the software doesn't seem to like it when I use the time factor (days after planting) as a numerical value. When I use this in the residual, I get an error message that says "Error in spc("cor", "cor", 0.1, numeric(0), NA, obj, init, data) : DAP must be a factor".
<br />
2)At the moment, I'm only using the DAP correlation in the residual term, but I'm not sure if I should have the Depth too?
<br />
3) I have a lot of zeros, especially at the beginning of the season as roots have not yet grown into the deeper layers. Could that be a problem? My residuals plots sure look funky.
<br />
4) Since this is a growth curve, I was thinking of using a power error structure, however, regardless of the correlation error structure, I always get the same loglikelihood and residuals plots. Is that normal?
<br />
<br />
Any advice?
<br />
Thanks in advance,
<br />
Maryse BASRemlhttp://forum.vsni.co.uk//posting.php?mode=reply&t=1920marysebMon, 25 Nov 2019 19:08:54 GMThttp://forum.vsni.co.uk/viewtopic.php?p=5557#5557ASReml - VPREDICT failing to read asr file
http://forum.vsni.co.uk/viewtopic.php?p=5537#5537
Hello,
<br />
<br />
I am trying to calculate hertibility after running a binomial gblup model. I'm using a standalone ASReml4 on a Mac.
<br />
<br />
The model runs to convergence but when it gets to manipulating the variance components I get the error below
<br />
<br />
<span style="font-style: italic">Failed to interpret line: Reading pedigree file M048_Dead_and_Alive_Pedigree.
<br />
txt: ski
<br />
Failed to interpret line: Reading pedigree file M048_Dead_and_Alive_Pedigree.
<br />
txt: ski
<br />
Program to calculate functions of variance components from ASReml output.
<br />
Reads <xx>.asr, <xx>.vvp and <xx>.pin, writes <xx>.pvc
<br />
Usage ASREML -P <xx>[.pin]
<br />
or ASREML -P<xx>[.asr] <xx>[.pin]
<br />
<xx>.pin gives the function of components to be calculated
<br />
The input file may have a different extension (not PIN).
<br />
Fields may be TAB SPACE or COMMA separated.
<br />
" characters are ignored; Anything after # is ignored
<br />
Input consists of lines of three types
<br />
Each line consists of a code in column 1 (P, H or R),
<br />
a label and a list of arguments (space separated)
<br />
P label c calculates c'v, Cov(c'v,v) and Var(c'v)
<br />
where v is the existing variance components
<br />
c is coefficients for a linear function
<br />
It is used to construct linear functions of variances
<br />
NB each P line extends v by one term
<br />
H label n d calculates v(n)/v(d) and Var[v(n)/v(d)]
<br />
i.e. is used to calculate heritability
<br />
R label a ab b calculates v(ab)/sqrt[v(a)v(b)] and its
<br />
variance (i.e. a correlation)</span>[/i]
<br />
<br />
Making a separate pin file resulted in the same error.
<br />
<br />
I can see that there is a problem reading the asr file, but I can't understand why that would be since the model ran to completion. Any advice on how to fix this is greatly appreciated.
<br />
<br />
Thanks,
<br />
<br />
JoshuaASRemlhttp://forum.vsni.co.uk//posting.php?mode=reply&t=1919JoshuaWed, 30 Oct 2019 17:52:48 GMThttp://forum.vsni.co.uk/viewtopic.php?p=5537#5537ASReml - ASREML-R Changing residual variance
http://forum.vsni.co.uk/viewtopic.php?p=5535#5535
Hello everyone,
<br />
<br />
I am using a paternal half-sib, maternal full-sib breeding design to estimate the heritability of sex ratio in a laboratory population of snapping turtles. Each female is mated to 3-4 males. I want to estimate the relative contribution of sire and dam(nested within sire) to sex ratio variation. I have coded sex as a binary trait with females = 0 and males = 1. Here is the model I am running in ASREML-R:
<br />
<br />
model.1 <- asreml(fixed = sex ~ 1, random = ~sire + sire/dam, data=phenotypeA, family = asr_binomial(link=logit))
<br />
<br />
With this model, residual variance is fixed at 1 by default. However, I want to set the residual variance to a different value.
<br />
<br />
I attempted to change the residual variance following the instructions in the ASREML-R reference manual version 4 under section 3.7.1.1 Replacing elements in an internal object. Here is the code I used to change the initial value of residual variance from 1 to 3.2899:
<br />
<br />
model.2 <- asreml(fixed = sex ~ 1, random = ~sire + sire/dam, data=phenotypeA, family = asr_binomial(link=logit), start.values=TRUE)
<br />
<br />
model.2$vparameters.table[1, 2] = 3.2899
<br />
<br />
model.3 <- asreml(fixed = sex ~ 1, random = ~sire + sire/dam, data=phenotypeA, family = asr_binomial(link=logit), G.param = model.2)
<br />
<br />
After running model.3, and calculating heritability, the estimate remains the same. I checked the variance components table for model.3 and the residual variance remains fixed at 1.
<br />
<br />
<span style="font-weight: bold">My question is, how can I change the residual variance value from the default?
<br />
</span>
<br />
Thank you very much for your help!ASRemlhttp://forum.vsni.co.uk//posting.php?mode=reply&t=1918Sixburgh58Thu, 10 Oct 2019 13:46:32 GMThttp://forum.vsni.co.uk/viewtopic.php?p=5535#5535ASReml - RE: could we run multivarite model for MET
http://forum.vsni.co.uk/viewtopic.php?p=5534#5534
I do not have real datasets, just as an example. The following codes could run in asreml-R 4.1, but does this model have real meaning? Although the model will get each xfa structure for each trait, I still doubt the model's meaning.
<br />
<br />
cheers
<br />
<br />
Yuanzhen
<br />
<br />
<br />
<div class="code">Code:<div class="inside_code">
<br />
asreml.options(ai.sing=T)
<br />
run9<-asreml(cbind(yield,hh1)~trait+trait:Loc,
<br />
random=~at(trait):us(trait):fa(Loc,1):Genotype,
<br />
residual=~units:us(trait),
<br />
#residual=~dsum(~units:diag(trait)|Loc),
<br />
maxit=10,data=MET)
<br />
<br />
Var(run9)
<br />
<br />
component
<br />
at(trait, yield):trait:fa(Loc, 1):Genotype!trait_yield:yield 26.511314673
<br />
at(trait, yield):trait:fa(Loc, 1):Genotype!trait_hh1:yield 4.139143529
<br />
at(trait, yield):trait:fa(Loc, 1):Genotype!trait_hh1:hh1 6.208715293
<br />
at(trait, yield):trait:fa(Loc, 1):Genotype!1!var 0.000000000
<br />
at(trait, yield):trait:fa(Loc, 1):Genotype!2!var 0.087426566
<br />
at(trait, yield):trait:fa(Loc, 1):Genotype!3!var 0.090362905
<br />
at(trait, yield):trait:fa(Loc, 1):Genotype!4!var 0.261599691
<br />
at(trait, yield):trait:fa(Loc, 1):Genotype!5!var 0.000001600
<br />
at(trait, yield):trait:fa(Loc, 1):Genotype!6!var 0.000001600
<br />
at(trait, yield):trait:fa(Loc, 1):Genotype!1!fa1 0.407585698
<br />
at(trait, yield):trait:fa(Loc, 1):Genotype!2!fa1 0.394941929
<br />
at(trait, yield):trait:fa(Loc, 1):Genotype!3!fa1 0.255072194
<br />
at(trait, yield):trait:fa(Loc, 1):Genotype!4!fa1 0.375419515
<br />
at(trait, yield):trait:fa(Loc, 1):Genotype!5!fa1 0.301101708
<br />
at(trait, yield):trait:fa(Loc, 1):Genotype!6!fa1 0.104013083
<br />
at(trait, hh1):trait:fa(Loc, 1):Genotype!trait_yield:yield 6.208715293
<br />
at(trait, hh1):trait:fa(Loc, 1):Genotype!trait_hh1:yield 4.139143529
<br />
at(trait, hh1):trait:fa(Loc, 1):Genotype!trait_hh1:hh1 0.948916905
<br />
at(trait, hh1):trait:fa(Loc, 1):Genotype!1!var 7.445363318
<br />
at(trait, hh1):trait:fa(Loc, 1):Genotype!2!var 0.002515794
<br />
at(trait, hh1):trait:fa(Loc, 1):Genotype!3!var 0.000000000
<br />
at(trait, hh1):trait:fa(Loc, 1):Genotype!4!var 0.000000000
<br />
at(trait, hh1):trait:fa(Loc, 1):Genotype!5!var 0.000001600
<br />
at(trait, hh1):trait:fa(Loc, 1):Genotype!6!var 2.976343939
<br />
at(trait, hh1):trait:fa(Loc, 1):Genotype!1!fa1 -0.793744164
<br />
at(trait, hh1):trait:fa(Loc, 1):Genotype!2!fa1 3.816775300
<br />
at(trait, hh1):trait:fa(Loc, 1):Genotype!3!fa1 1.643122019
<br />
at(trait, hh1):trait:fa(Loc, 1):Genotype!4!fa1 -1.157603387
<br />
at(trait, hh1):trait:fa(Loc, 1):Genotype!5!fa1 0.002461397
<br />
at(trait, hh1):trait:fa(Loc, 1):Genotype!6!fa1 0.240477558
<br />
......
<br />
<br />
</div></div>
<br />
<br />
<div class="quote">Zhiqiang wrote:<div class="inside_quote">Hi Yuanzhen,
<br />
<br />
The model you suggested may not be the one I exactly want. As I want also to estimate genetic correlation between trials (MET) for each trait, and then consider multivariate models. When I run the model you suggested, I found I only get one XFA structure. Would we get two XFA structures? one for each trait?
<br />
<br />
<br />
Cheers
<br />
Chen
<br />
<br />
<br />
<div class="quote">yzhlinscau wrote:<div class="inside_quote">Adj_Hjd Adj_Dia ~ Trait Trait.Trial !f mv !r us(Trait).xfa1(Trial).Mum
<br />
residual at(Trial).units.us(Trait)
<br />
<br />
would do work.
<br />
<br />
cheers
<br />
<br />
<br />
<br />
<div class="quote">Zhiqiang wrote:<div class="inside_quote">Hi all,
<br />
<br />
I was wondering if we could run a multivariate model for MET data as below
<br />
<br />
!PART 1
<br />
Adj_Hjd Adj_Dia ~ Trait Trait.Trial !f mv !r us(Trait).xfa1(Trial.Mum)
<br />
residual units.us(Trait)
<br />
<br />
As I know, we could run a univariate model for MET data as below
<br />
<br />
!PART 2
<br />
Adj_Hjd ~ mu Trait !r xfa1(Trial).Mum
<br />
residual at(Trial).units
<br />
<br />
<br />
Cheers
<br />
Chen</div></div></div></div></div></div><div class="code">Code:<div class="inside_code"></div></div>ASRemlhttp://forum.vsni.co.uk//posting.php?mode=reply&t=1917yzhlinscauSun, 06 Oct 2019 08:53:46 GMThttp://forum.vsni.co.uk/viewtopic.php?p=5534#5534ASReml - RE: could we run multivarite model for MET
http://forum.vsni.co.uk/viewtopic.php?p=5533#5533
Hi Yuanzhen,
<br />
<br />
The model you suggested may not be the one I exactly want. As I want also to estimate genetic correlation between trials (MET) for each trait, and then consider multivariate models. When I run the model you suggested, I found I only get one XFA structure. Would we get two XFA structures? one for each trait?
<br />
<br />
<br />
Cheers
<br />
Chen
<br />
<br />
<br />
<div class="quote">yzhlinscau wrote:<div class="inside_quote">Adj_Hjd Adj_Dia ~ Trait Trait.Trial !f mv !r us(Trait).xfa1(Trial).Mum
<br />
residual at(Trial).units.us(Trait)
<br />
<br />
would do work.
<br />
<br />
cheers
<br />
<br />
<br />
<br />
<div class="quote">Zhiqiang wrote:<div class="inside_quote">Hi all,
<br />
<br />
I was wondering if we could run a multivariate model for MET data as below
<br />
<br />
!PART 1
<br />
Adj_Hjd Adj_Dia ~ Trait Trait.Trial !f mv !r us(Trait).xfa1(Trial.Mum)
<br />
residual units.us(Trait)
<br />
<br />
As I know, we could run a univariate model for MET data as below
<br />
<br />
!PART 2
<br />
Adj_Hjd ~ mu Trait !r xfa1(Trial).Mum
<br />
residual at(Trial).units
<br />
<br />
<br />
Cheers
<br />
Chen</div></div></div></div>ASRemlhttp://forum.vsni.co.uk//posting.php?mode=reply&t=1917ZhiqiangWed, 02 Oct 2019 09:41:16 GMThttp://forum.vsni.co.uk/viewtopic.php?p=5533#5533ASReml - RE: could we run multivarite model for MET
http://forum.vsni.co.uk/viewtopic.php?p=5531#5531
Adj_Hjd Adj_Dia ~ Trait Trait.Trial !f mv !r us(Trait).xfa1(Trial).Mum
<br />
residual at(Trial).units.us(Trait)
<br />
<br />
would do work.
<br />
<br />
cheers
<br />
<br />
<br />
<br />
<div class="quote">Zhiqiang wrote:<div class="inside_quote">Hi all,
<br />
<br />
I was wondering if we could run a multivariate model for MET data as below
<br />
<br />
!PART 1
<br />
Adj_Hjd Adj_Dia ~ Trait Trait.Trial !f mv !r us(Trait).xfa1(Trial.Mum)
<br />
residual units.us(Trait)
<br />
<br />
As I know, we could run a univariate model for MET data as below
<br />
<br />
!PART 2
<br />
Adj_Hjd ~ mu Trait !r xfa1(Trial).Mum
<br />
residual at(Trial).units
<br />
<br />
<br />
Cheers
<br />
Chen</div></div>ASRemlhttp://forum.vsni.co.uk//posting.php?mode=reply&t=1917yzhlinscauSun, 29 Sep 2019 07:57:10 GMThttp://forum.vsni.co.uk/viewtopic.php?p=5531#5531ASReml - could we run multivarite model for MET
http://forum.vsni.co.uk/viewtopic.php?p=5530#5530
Hi all,
<br />
<br />
I was wondering if we could run a multivariate model for MET data as below
<br />
<br />
!PART 1
<br />
Adj_Hjd Adj_Dia ~ Trait Trait.Trial !f mv !r us(Trait).xfa1(Trial.Mum)
<br />
residual units.us(Trait)
<br />
<br />
As I know, we could run a univariate model for MET data as below
<br />
<br />
!PART 2
<br />
Adj_Hjd ~ mu Trait !r xfa1(Trial).Mum
<br />
residual at(Trial).units
<br />
<br />
<br />
Cheers
<br />
ChenASRemlhttp://forum.vsni.co.uk//posting.php?mode=reply&t=1917ZhiqiangTue, 24 Sep 2019 13:32:04 GMThttp://forum.vsni.co.uk/viewtopic.php?p=5530#5530