Forum | VSN International
http://www.vsni.co.uk/forum/
The forum for discussion of VSN International software and general statistical issuesenCopyright 2000-2010 VSN International Ltd.support@vsni.co.uksupport@vsni.co.ukhttp://blogs.law.harvard.edu/tech/rss60Thu, 23 Nov 2017 13:05:49 GMTThu, 23 Nov 2017 13:05:49 GMThttp://www.vsni.co.uk/common/images/asreml145.gifForum | VSN International
http://www.vsni.co.uk/forum/
GenStat - RE: Using the inclusion .IN. operator
http://www.vsni.co.uk/forum/viewtopic.php?p=5267#5267
GenStathttp://www.vsni.co.uk/forum/posting.php?mode=reply&t=1784david@vsn.co.nzThu, 23 Nov 2017 03:53:42 GMThttp://www.vsni.co.uk/forum/viewtopic.php?p=5267#5267GenStat - Using the inclusion .IN. operator
http://www.vsni.co.uk/forum/viewtopic.php?p=5266#5266
Hi All
<br />
<br />
I have some code that loops through levels of a factor, creating a subset of the data each time. Then with each data subset, I check for the presence of a value of a particular factor.
<br />
My code worked very well when the subset returned just one row of data, but not when multiple rows were present. It seems that I don't understand the inclusion operator, .IN., as well as I thought I did.
<br />
I wonder if anyone can shed some light on what my inclusion comparisons are actually doing in the example code below.
<br />
<br />
delete [redef=y] fac,fac1
<br />
factor [lev=3; lab=!t(L,M,H)] fac; val=!(2(1...3))
<br />
factor [lev=3; lab=!t(L,M,H)] fac1; val=!(1) "a factor with just one value"
<br />
<br />
print fac,fac1
<br />
"use order: factor .IN. target"
<br />
"returns a vector that matches the length of factor"
<br />
print fac,fac1 .in. 'L'
<br />
print fac,fac1 .in. 1
<br />
<br />
"use order: target .IN. factor"
<br />
"returns a vector that matches the length of target"
<br />
print 'L' .in. fac,fac1
<br />
print 1 .in. fac,fac1
<br />
<br />
"Test using fac$[1] to get just the first value of fac"
<br />
print fac$[1],fac1
<br />
"text inclusion in fac$[1] fails!!"
<br />
print 'L' .in. fac$[1],fac1
<br />
"numeric inclusion in fac$[1] works"
<br />
print 1 .in. fac$[1],fac1
<br />
<br />
"Why a fault?"
<br />
"use order: factor .IN. target"
<br />
print fac$[1] .in. 1
<br />
print fac$[1] .in. 'L'
<br />
<br />
Cheers,
<br />
Andrew Mc
<br />
<br />
Andrew McLachlan
<br />
Biometrician
<br />
<br />
T: +64 6 355 6110
<br />
M: +64 212581882
<br />
F: +64 6 351 7050
<br />
E: <a href="mailto:andrew.mclachlan@plantandfood.co.nz">andrew.mclachlan@plantandfood.co.nz</a>
<br />
<a href="http://www.plantandfood.co.nz" target="_blank">www.plantandfood.co.nz</a>
<br />
The New Zealand Institute for Plant & Food Research Limited
<br />
<br />
Postal Address: Plant & Food Research
<br />
Private Bag 11600, Palmerston North 4442, New Zealand
<br />
Physical Address: Plant & Food Research
<br />
Food Industry Science Centre, Fitzherbert Science Centre, Batchelar Road, Palmerston North 4474, New Zealand
<br />
<br />
<br />
The contents of this e-mail are confidential and may be subject to legal privilege.
<br />
If you are not the intended recipient you must not use, disseminate, distribute or
<br />
reproduce all or any part of this e-mail or attachments. If you have received this
<br />
e-mail in error, please notify the sender and delete all material pertaining to this
<br />
e-mail. Any opinion or views expressed in this e-mail are those of the individual
<br />
sender and may not represent those of The New Zealand Institute for Plant and
<br />
Food Research Limited.
<br />
<br />
Post generated using Mail2Forum (http://www.mail2forum.com)GenStathttp://www.vsni.co.uk/forum/posting.php?mode=reply&t=1784AndrewMcThu, 23 Nov 2017 02:26:43 GMThttp://www.vsni.co.uk/forum/viewtopic.php?p=5266#5266ASReml - What is the ridge regression penalties in multitrait GBLUP
http://www.vsni.co.uk/forum/viewtopic.php?p=5264#5264
Dear Arthur,
<br />
<br />
Could you please introduce a bit about the ridge regression penalties in multi-trait GBLUP analysis in AsREML.
<br />
<br />
In Henderson's original paper 1973, the ridge regression penalty in single-trait analysis is
<br />
<br />
lambda = signma^2_e/sigma^2_beta
<br />
<br />
On the ridge regression penalties in mulit-trait GBLUP in asREML, does each trait have its own ridge regression penalty? For example, whether the penalty for the i'th trait is
<br />
<br />
lambda_i = signma^2_e_i/sigma^2_beta_i
<br />
<br />
Thank you very much for the help.
<br />
<br />
Regards,
<br />
<br />
ZachASRemlhttp://www.vsni.co.uk/forum/posting.php?mode=reply&t=1783ZachHuMon, 20 Nov 2017 01:46:07 GMThttp://www.vsni.co.uk/forum/viewtopic.php?p=5264#5264ASReml - RE: !G and group of variates
http://www.vsni.co.uk/forum/viewtopic.php?p=5263#5263
Hi Arthur,
<br />
<br />
A pity - but thanks for letting me know. Do you think there is any chance to add this functionality in the near future, or should I seek a different solution?
<br />
<br />
Cheers,
<br />
<br />
JarrodASRemlhttp://www.vsni.co.uk/forum/posting.php?mode=reply&t=1781j.hadfield@ed.ac.ukSat, 18 Nov 2017 10:15:12 GMThttp://www.vsni.co.uk/forum/viewtopic.php?p=5263#5263ASReml - RE: how to match genomic relationship G matrix to pedigree file
http://www.vsni.co.uk/forum/viewtopic.php?p=5262#5262
Dear Sir,
<br />
<br />
It sounds to me that you have it correct.
<br />
<br />
You have omitted the pedigree file line because you no longer have a factor defined with !P
<br />
<br />
In the data file, you have deleted the parent records (since these have no data and no genotype information)
<br />
<br />
You can check the .sln file to see you have the expected number of effects.ASRemlhttp://www.vsni.co.uk/forum/posting.php?mode=reply&t=1782ArthurSat, 18 Nov 2017 05:49:55 GMThttp://www.vsni.co.uk/forum/viewtopic.php?p=5262#5262ASReml - RE: !G and group of variates
http://www.vsni.co.uk/forum/viewtopic.php?p=5261#5261
Dear Jarrod,
<br />
<br />
It seems you are asking for a model I have not considered/covered.
<br />
<br />
Following is a job showing the vec() model function.
<br />
<br />
!WORKSPACE 100 !RENAME !ARGS 6 // !DOPART $1
<br />
Title: vech.
<br />
# Y1 Y2 C1 c2 x1 x2
<br />
# 65 70 1 1 2 3
<br />
# 75 74 2 1 2 3
<br />
# 71 78 2 2 2 3
<br />
# 71 81 1 1 4 5
<br />
# 75 85 1 2 4 5
<br />
# 85 95 2 2 4 5
<br />
# 81 86 1 1 6 7
<br />
# 85 91 2 1 6 7
<br />
# 95 91 2 2 6 7
<br />
Y1 # 71
<br />
Y2 # 81
<br />
C !G 2 2 # 1
<br />
X !G 2 # 5
<br />
<br />
vech.asd !SKIP 1
<br />
!PART 1
<br />
Y1 ~ mu C[1].X[1]
<br />
<br />
!PART 2
<br />
Y2 ~ mu C[2].X[2]
<br />
<br />
!PART 3
<br />
Y1 Y2 ~ Trait Trait.vec(X).vec(C)
<br />
<br />
!PART 4
<br />
Y1 ~ mu X[1]
<br />
<br />
!PART 5
<br />
Y2 ~ mu X[2]
<br />
<br />
!PART 6
<br />
Y1 Y2 ~ Trait Trait.vec(X)
<br />
<br />
I think you want something like PART 3 which is the combination of PARTS 1 and 2,
<br />
<br />
But PART 3 does not run.
<br />
<br />
Part 6 which is the combination of parts 4 and 5 does run.
<br />
<br />
Sorry about that.ASRemlhttp://www.vsni.co.uk/forum/posting.php?mode=reply&t=1781ArthurSat, 18 Nov 2017 05:42:38 GMThttp://www.vsni.co.uk/forum/viewtopic.php?p=5261#5261ASReml - RE: !G and group of variates
http://www.vsni.co.uk/forum/viewtopic.php?p=5260#5260
Hi Arthur,
<br />
<br />
Thank you - that seemed to resolve things but there still seems to be some issues. I have groups of variates in blocks of 7. The c's are factors:
<br />
<br />
c1 !G 7 3746
<br />
c2 !G 7 3746
<br />
c3 !G 7 3746
<br />
<br />
The w's are numeric weights:
<br />
<br />
w1 !G 7
<br />
w2 !G 7
<br />
w3 !G 7
<br />
<br />
If the data were in long format (and day indexed 'Traits') I would like to fit the random effect model
<br />
<br />
day.c1.w1 -day.c2.w2 and(day.c2.w2) -day.c3.w3 and(day.c3.w3)
<br />
<br />
which is a multimembership model where each random effect has a unique weighting. The levels of c are also associated with a pedigree.
<br />
<br />
I thought that in wide format the equivalent model would be:
<br />
<br />
c1.w1 -c2.w2 and(c2.w2) -c3.w3 and(c3.w3)
<br />
<br />
However, this tells me c1 is a 7 x 32179 interaction where I think it should be a 7 x 3746 interaction. It also complains that the NRM/GRM matrix is undefined or the wrong size, which is perhas related to the same issue?
<br />
I thought that perhaps the w's were not being treated as numeric, but 3746 x the number of uniqe numbers in w1 does not equal 32179 so I'm a bit stumped.
<br />
<br />
Any help would be gratefully received.
<br />
<br />
Cheers,
<br />
<br />
JarrodASRemlhttp://www.vsni.co.uk/forum/posting.php?mode=reply&t=1781j.hadfield@ed.ac.ukWed, 15 Nov 2017 11:55:10 GMThttp://www.vsni.co.uk/forum/viewtopic.php?p=5260#5260ASReml - RE: how to match genomic relationship G matrix to pedigree file
http://www.vsni.co.uk/forum/viewtopic.php?p=5259#5259
ASRemlhttp://www.vsni.co.uk/forum/posting.php?mode=reply&t=1782ZhiqiangWed, 15 Nov 2017 10:52:42 GMThttp://www.vsni.co.uk/forum/viewtopic.php?p=5259#5259ASReml - RE: Coding genotype data of Multi-parent population
http://www.vsni.co.uk/forum/viewtopic.php?p=5258#5258
Dear Sir,
<br />
<br />
Did you receive my sample file?
<br />
<br />
Thanks
<br />
<br />
HeinASRemlhttp://www.vsni.co.uk/forum/posting.php?mode=reply&t=1777Hein ZawWed, 15 Nov 2017 09:50:42 GMThttp://www.vsni.co.uk/forum/viewtopic.php?p=5258#5258ASReml - RE: how to match genomic relationship G matrix to pedigree file
http://www.vsni.co.uk/forum/viewtopic.php?p=5257#5257
Dear Chen, Assuming you are using ASReml 4,
<br />
you need to create a file with level names in the order used to create the GRM/GIV matrix
<br />
and declare the ID variable initializing the levels from the file
<br />
<br />
e.g.
<br />
<br />
ID !A !L grmnames.txt
<br />
<br />
<br />
ASReml will add to the list names it finds in the data that are not in grmnames.txt
<br />
<br />
Now you need to think about the model for these extra rows.
<br />
<br />
If you leave them there, ASReml will just partition the residual according to the variance components.
<br />
Else you can drop the records for these extra trees. So, if you had 100 trees in the GRM (named in grmnames.txt)
<br />
you could write
<br />
<br />
ID !A 100 !D>100 !L grmnames.txtASRemlhttp://www.vsni.co.uk/forum/posting.php?mode=reply&t=1782ArthurTue, 14 Nov 2017 23:31:24 GMThttp://www.vsni.co.uk/forum/viewtopic.php?p=5257#5257