<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-6715598735361401237</atom:id><lastBuildDate>Sun, 28 Apr 2013 14:22:10 +0000</lastBuildDate><category>linux</category><category>Python</category><category>agriculture</category><category>genetics</category><category>web</category><category>INLA</category><category>LyX</category><category>graphics</category><category>plants</category><category>animalScience</category><category>music</category><category>gheep</category><category>computers</category><category>poultry</category><category>life</category><category>LyX-Sweave</category><category>Sweave</category><category>SAS</category><category>biology</category><category>shell</category><category>si</category><category>study</category><category>rabbits</category><category>writings</category><category>BUGS</category><category>joke</category><category>video</category><category>honeyBee</category><category>cattle</category><category>horses</category><category>statistics</category><category>Sweave.sh</category><category>data</category><category>LaTeX</category><category>talks</category><category>science</category><category>R</category><title>Gregor Gorjanc (gg)</title><description>About various things that cross my mind</description><link>http://ggorjan.blogspot.com/</link><managingEditor>noreply@blogger.com (Gregor Gorjanc)</managingEditor><generator>Blogger</generator><openSearch:totalResults>357</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/GregorGorjancsBlog" /><feedburner:info uri="gregorgorjancsblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-7519349286627187385</guid><pubDate>Sun, 28 Apr 2013 14:22:00 +0000</pubDate><atom:updated>2013-04-28T16:22:10.677+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">video</category><category domain="http://www.blogger.com/atom/ns#">study</category><title>Nice introductory videos on DNA, Y chromosome, mitochondrial DNA and phylogeography</title><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.yorkshiresdna.com/dna/genetic-code"&gt;The genetic code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.yorkshiresdna.com/dna/y-chromosome"&gt;YChr&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.yorkshiresdna.com/dna/mitochondrial-dna"&gt;mtDNA&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.yorkshiresdna.com/dna/phylogeography"&gt;PhyloGeography&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.yorkshiresdna.com/dna/autosomal-dna"&gt;Autosomal DNA&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/LLtWnIU2li8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/LLtWnIU2li8/nice-introductory-videos-on-dna-y.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2013/04/nice-introductory-videos-on-dna-y.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-9204505617794736850</guid><pubDate>Sun, 07 Apr 2013 09:38:00 +0000</pubDate><atom:updated>2013-04-07T11:38:06.499+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">genetics</category><category domain="http://www.blogger.com/atom/ns#">study</category><category domain="http://www.blogger.com/atom/ns#">animalScience</category><title>Integrating quantitative genetics and genomic in animal breeding graduate learning</title><description>&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Follow link bellow for a set of graduate courses funded by USDA:&lt;/span&gt;&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;a href="http://enbgeo.iddl.vt.edu/"&gt;Integrating quantitative genetics and genomic in animal breeding graduate learning&lt;/a&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/gqpzJ6pdmls" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/gqpzJ6pdmls/integrating-quantitative-genetics-and.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2013/04/integrating-quantitative-genetics-and.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-8495487025063887325</guid><pubDate>Mon, 18 Mar 2013 01:05:00 +0000</pubDate><atom:updated>2013-03-18T02:05:06.333+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">video</category><category domain="http://www.blogger.com/atom/ns#">genetics</category><title>Medical and Population Genetics videos</title><description>Nice set of videos from Broad Institute on Medical and Population Genetics/Genomics:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.broadinstitute.org/scientific-community/science/programs/medical-and-population-genetics/primers/primer-medical-and-pop"&gt;Primer&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.broadinstitute.org/scientific-community/science/programs/medical-and-population-genetics/platforms-human-genetics"&gt;Platforms for Human Genetics Workshop Materials&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.broadinstitute.org/scientific-community/science/programs/medical-and-population-genetics/snapshots-genome-wide-analysis"&gt;Snapshots of Genome Wide Analysis in Human Disease Workshop Materials&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.broadinstitute.org/science/programs/medical-and-population-genetics/next-generation-sequencing-workshop-materials"&gt;Next-Generation Sequencing Workshop Materials&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/ATBvH9qypVs" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/ATBvH9qypVs/medical-and-population-genetics-videos.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2013/03/medical-and-population-genetics-videos.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-5896128938526671329</guid><pubDate>Mon, 11 Feb 2013 08:07:00 +0000</pubDate><atom:updated>2013-02-11T09:07:37.563+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">si</category><category domain="http://www.blogger.com/atom/ns#">life</category><title>Kmečka pamet</title><description>Zdrava kmečka pamet lahko nadomesti skoraj vsak nivo izobrazbe,

Vendar noben nivo izobrazbe ne more nadomestiti zdrave kmečke pameti.

Arthur  Schopenha&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/_7Kpd29Fx_Q" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/_7Kpd29Fx_Q/kmecka-pamet.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2013/02/kmecka-pamet.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-3409232257444724970</guid><pubDate>Sun, 27 Jan 2013 02:29:00 +0000</pubDate><atom:updated>2013-01-27T03:31:28.761+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">writings</category><category domain="http://www.blogger.com/atom/ns#">genetics</category><category domain="http://www.blogger.com/atom/ns#">animalScience</category><title>The contribution of dominance and inbreeding depression in estimating variance components for litter size in Pannon White rabbits </title><description>&lt;div style="text-align: justify;"&gt;
Our &lt;a href="http://onlinelibrary.wiley.com/doi/10.1111/jbg.12022/abstract"&gt;paper&lt;/a&gt; on analysis of dominance in Pannon White rabbits has been accepted and will appear in Journal of Animal breeding and Genetics. Abstract says:&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
In a synthetic closed population of Pannon White rabbits, additive (VA), dominance (VD) and permanent environmental (VPe) variance components as well as doe (bFd) and litter (bFl) inbreeding depression were estimated for the number of kits born alive (NBA), number of kits born dead (NBD) and total number of kits born (TNB). The data set consisted of 18,398 kindling records of 3883 does collected from 1992 to 2009. Six models were used to estimate dominance and inbreeding effects. The most complete model estimated VA and VD to contribute 5.5 ± 1.1% and 4.8 ± 2.4%, respectively, to total phenotypic variance (VP) for NBA; the corresponding values for NBD were 1.9 ± 0.6% and 5.3 ± 2.4%, for TNB, 6.2 ± 1.0% and 8.1 ± 3.2% respectively. These results indicate the presence of considerable VD. Including dominance in the model generally reduced VA and VPe estimates, and had only a very small effect on inbreeding depression estimates. Including inbreeding covariates did not affect estimates of any variance component. A 10% increase in doe inbreeding significantly increased NBD (bFd = 0.18 ± 0.07), while a 10% increase in litter inbreeding significantly reduced NBA (bFl = −0.41 ± 0.11) and TNB (bFl = −0.34 ± 0.10). These findings argue for including dominance effects in models of litter size traits in populations that exhibit significant dominance relationships.&lt;/div&gt;

&lt;p  style=" margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block;"&gt;   &lt;a title="View The contribution of dominance and inbreeding depression in estimating variance components for litter size in Pannon White rabbits on Scribd" href="http://www.scribd.com/doc/122379721/The-contribution-of-dominance-and-inbreeding-depression-in-estimating-variance-components-for-litter-size-in-Pannon-White-rabbits"  style="text-decoration: underline;" &gt;The contribution of dominance and inbreeding depression in estimating variance components for litter size i...&lt;/a&gt; by   &lt;a title="View 's profile on Scribd" href="undefined"  style="text-decoration: underline;" &gt;&lt;/a&gt; &lt;/p&gt;&lt;iframe class="scribd_iframe_embed" src="http://www.scribd.com/embeds/122379721/content?start_page=1&amp;view_mode=scroll" data-auto-height="false" data-aspect-ratio="undefined" scrolling="no" id="doc_59400" width="100%" height="600" frameborder="0"&gt;&lt;/iframe&gt;&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/wWPqgSdMs7Q" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/wWPqgSdMs7Q/the-contribution-of-dominance-and.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2013/01/the-contribution-of-dominance-and.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-8628121206312341794</guid><pubDate>Sun, 27 Jan 2013 02:13:00 +0000</pubDate><atom:updated>2013-01-27T03:27:03.265+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">writings</category><category domain="http://www.blogger.com/atom/ns#">genetics</category><title>Genomic evaluations using similarity between haplotypes</title><description>&lt;div style="text-align: justify;"&gt;
Our &lt;a href="http://onlinelibrary.wiley.com/doi/10.1111/jbg.12020/abstract"&gt;paper&lt;/a&gt; on using haplotypes to build relationships between individuals has been accepted and will appear in Journal of Animal breeding and Genetics. Abstract says:&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
Long-range phasing and haplotype library imputation methodologies are accurate and efficient methods to provide haplotype information that could be used in prediction of breeding value or phenotype. Modelling long haplotypes as independent effects in genomic prediction would be inefficient due to the many effects that need to be estimated and phasing errors, even if relatively low in frequency, exacerbate this problem. One approach to overcome this is to use similarity between haplotypes to model covariance of genomic effects by region or of animal breeding values. We developed a simple method to do this and tested impact on genomic prediction by simulation. Results show that the diagonal and off-diagonal elements of a genomic relationship matrix constructed using the haplotype similarity method had higher correlations with the true relationship between pairs of individuals than genomic relationship matrices built using unphased genotypes or assumed unrelated haplotypes. However, the prediction accuracy of such haplotype-based prediction methods was not higher than those based on unphased genotype information.&lt;/div&gt;

&lt;p  style=" margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block;"&gt;   &lt;a title="View Genomic evaluations using similarity between haplotypes on Scribd" href="http://www.scribd.com/doc/122379269/Genomic-evaluations-using-similarity-between-haplotypes"  style="text-decoration: underline;" &gt;Genomic evaluations using similarity between haplotypes&lt;/a&gt; by   &lt;a title="View 's profile on Scribd" href="undefined"  style="text-decoration: underline;" &gt;&lt;/a&gt; &lt;/p&gt;&lt;iframe class="scribd_iframe_embed" src="http://www.scribd.com/embeds/122379269/content?start_page=1&amp;view_mode=scroll" data-auto-height="false" data-aspect-ratio="undefined" scrolling="no" id="doc_46666" width="100%" height="600" frameborder="0"&gt;&lt;/iframe&gt;&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/aL6Rkn4vzak" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/aL6Rkn4vzak/genomic-evaluations-using-similarity.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2013/01/genomic-evaluations-using-similarity.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-16480336538750906</guid><pubDate>Fri, 25 Jan 2013 17:45:00 +0000</pubDate><atom:updated>2013-01-25T18:45:46.434+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">writings</category><category domain="http://www.blogger.com/atom/ns#">genetics</category><category domain="http://www.blogger.com/atom/ns#">plants</category><category domain="http://www.blogger.com/atom/ns#">talks</category><category domain="http://www.blogger.com/atom/ns#">agriculture</category><title>Simulation of different strategies to implement genomic selection in plant breeding</title><description>&lt;div style="text-align: justify;"&gt;
Our submitted abstract for the &lt;a href="http://www.vipca.at/conferences/active/conference3/index.php"&gt;VIPCA&lt;/a&gt; conference.&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
Gorjanc G, Crossa J,&amp;nbsp;Dreisigacker S, Autrique E, Hickey J&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
Genomic information provides a rich resource for plant improvement. The greatest advantage of genomic information is achived when used early in a programme. The aim of this contribution was to present different ways of utilizing genomic information in cross and self pollinated species early in the bi-parental population (BP) cycle in the F2 generation by simulation. Simulation mimicked a real breeding programme with BP of different degree of relationship. Simulated trait heritability was 0.5. Predictions were always within a focal BP (BPX) avoiding the effect of inflated accuracy due to population structure. Measure of interest was the correlation between true and predicted additive genetic value (accuracy). Predictions were based on training on collected data within BPX, from BP having one parent in common with BPX (BPPC), from BP having one grand-parent in common with BPX (BPGC), and from unrelated BP (BPUR). Results show that genomic predictions can be accurate early in the cycle. Accurate predictions within the BPX can be obtained with a small number of markers and moderate phenotyping of F2 derived lines. With 200 markers and 50 phenotypes accuracy was around 0.60 and increased to 0.80 with 100 phenotypes. Use of information from relatives requires denser marker panels and more phenotypes to properly model the expanding number of linkage blocks in progressively distantly related BP. However, these requirements can be spread over many related BP reducing the cost per BP. For example accuracy of 0.6 can be achieved by using 1,000 markers and 50 phenotypes from 4 BPPC and 40 BPUR or by using 10,000 markers and 50 phenotypes from 8 BPGC and 50 BPUR. Requirement for denser marker panels increases needed investment, which can be offset by proper use of imputation method making the whole procedure cost effective for real applications.&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/-PEvIo8QBk4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/-PEvIo8QBk4/simulation-of-different-strategies-to.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2013/01/simulation-of-different-strategies-to.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-5181912206762824085</guid><pubDate>Thu, 27 Dec 2012 23:31:00 +0000</pubDate><atom:updated>2012-12-28T00:31:53.473+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">computers</category><category domain="http://www.blogger.com/atom/ns#">shell</category><title>Functions dim, nrow, and ncol for shell</title><description>&lt;div style="text-align: justify;"&gt;
Ever wanted to find out quickly the number of rows and/or columns in file directly from terminal. There are many ways to skin this cat. Here is what I used for number of rows for quite a while:&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;wc -l filename&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
What about number of columns? "Easy", just combine head and awk commands:&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;head -n 1 filename | awk '{ print NF }'&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;
not a big problem (there are likely better ways to do this), but is long and tedious.&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
I got sick of typing commands above and assembled them in three easy to use function with &lt;a href="http://www.r-project.org/"&gt;R&lt;/a&gt;-like names: &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;nrow&lt;/span&gt;, &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;ncol&lt;/span&gt;, and &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;dim&lt;/span&gt;. &lt;b&gt;Functions are simply a collection of above ideas and assume that the file is of "rectangular shape", i.e., a table, a matrix, etc.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;dim()&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; for FILE in $@; do&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; NROW=$(nrow $FILE | awk '{ print $1}')&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; NCOL=$(ncol $FILE | awk '{ print $1}')&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; echo "$NROW $NCOL $FILE"&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; unset NROW NCOL&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; done&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;export -f dim&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;nrow ()&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; for FILE in $@; do&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; wc -l $FILE&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; done&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;export -f nrow&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;ncol ()&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; for FILE in $@; do&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; TMP=$(head $FILE -n 1 | awk '{ print NF }')&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; echo "$TMP $FILE"&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; unset TMP&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; done&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;export -f ncol&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
Add these files to your .bashrc or .profile or something similar and you can now simply type:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;nrow filename&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;ncol filename&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;dim filename&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;A simple test:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;touch file.txt&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;echo "line1 with four columns" &amp;gt;&amp;gt; file.txt&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;echo "line2 with four columns"&amp;nbsp;&amp;gt;&amp;gt; file.txt&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;nrow file.txt&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;div&gt;
2 file.txt&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;ncol file.txt&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;4 file.txt&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;dim file.txt&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;2 4 file.txt&lt;/span&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/KkcbynCAU8o" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/KkcbynCAU8o/functions-dim-nrow-and-ncol-for-shell.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>3</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/12/functions-dim-nrow-and-ncol-for-shell.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-7362745716411347986</guid><pubDate>Tue, 04 Dec 2012 15:25:00 +0000</pubDate><atom:updated>2012-12-04T16:25:16.780+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">computers</category><category domain="http://www.blogger.com/atom/ns#">linux</category><title>Recover deleted file under linux</title><description>&lt;div style="text-align: justify;"&gt;
&lt;a href="http://www.cyberciti.biz/tips/linux-ext3-ext4-deleted-files-recovery-howto.html"&gt;Here&lt;/a&gt; is a nice summary, but the bottom line is that the Ubuntu/Debian package testdisk has a nice utility called photorec that can be used to search for deleted files and recover. This is not a GUI program, though!&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/y7_nH8093yI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/y7_nH8093yI/recover-deleted-file-under-linux.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/12/recover-deleted-file-under-linux.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-770927052005051958</guid><pubDate>Tue, 23 Oct 2012 16:01:00 +0000</pubDate><atom:updated>2012-10-23T18:01:36.245+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">computers</category><category domain="http://www.blogger.com/atom/ns#">shell</category><title>AWK one-liners</title><description>See &lt;a href="http://nixshell.wordpress.com/2009/04/01/awk-one-liners/"&gt;here&lt;/a&gt;.&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/GPacG0t3NbQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/GPacG0t3NbQ/awk-one-liners.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/10/awk-one-liners.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-7048439042076149017</guid><pubDate>Thu, 11 Oct 2012 11:46:00 +0000</pubDate><atom:updated>2012-10-11T13:46:09.644+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">writings</category><category domain="http://www.blogger.com/atom/ns#">genetics</category><category domain="http://www.blogger.com/atom/ns#">animalScience</category><category domain="http://www.blogger.com/atom/ns#">agriculture</category><title>InterBull and ICAR papers</title><description>&lt;a title="View Reliability of breeding values in selected populations on Scribd" href="http://www.scribd.com/doc/109700016/Reliability-of-breeding-values-in-selected-populations" style="margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block; text-decoration: underline;"&gt;Reliability of breeding values in selected populations&lt;/a&gt;&lt;iframe class="scribd_iframe_embed" src="http://www.scribd.com/embeds/109700016/content?start_page=1&amp;view_mode=scroll&amp;access_key=key-gqpxdtp9tr4ib6jqkdi" data-auto-height="true" data-aspect-ratio="0.707514450867052" scrolling="no" id="doc_87093" width="100%" height="600" frameborder="0"&gt;&lt;/iframe&gt;

&lt;a title="View Partitioning International Genetic Trends by Origin in Holstein bulls on Scribd" href="http://www.scribd.com/doc/108440517/Partitioning-International-Genetic-Trends-by-Origin-in-Holstein-bulls" style="margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block; text-decoration: underline;"&gt;Partitioning International Genetic Trends by Origin in Holstein bulls&lt;/a&gt;&lt;iframe class="scribd_iframe_embed" src="http://www.scribd.com/embeds/108440517/content?start_page=1&amp;view_mode=scroll&amp;access_key=key-1gmaxlcgl9wyecs8aloz" data-auto-height="true" data-aspect-ratio="0.707514450867052" scrolling="no" id="doc_2053" width="100%" height="600" frameborder="0"&gt;&lt;/iframe&gt;&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/rDo6_E83LYc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/rDo6_E83LYc/interbull-and-icar-papers.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/10/interbull-and-icar-papers.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-3459690006341181433</guid><pubDate>Sun, 30 Sep 2012 05:07:00 +0000</pubDate><atom:updated>2012-09-30T07:07:06.643+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">genetics</category><category domain="http://www.blogger.com/atom/ns#">animalScience</category><category domain="http://www.blogger.com/atom/ns#">talks</category><title>Whole-genome evaluation of complex traits using SNP, haplotype, or QTL information</title><description>This is the presentation (and abstract bellow) of my talk at local congress &lt;a href="http://www.mf.uni-mb.si/mf/instituti/chmgf/Genetika2012%20Home.html"&gt;Genetika 2012&lt;/a&gt;.&lt;br /&gt;
&lt;a href="http://www.scribd.com/doc/108439861/Whole-genome-evaluation-of-complex-traits-using-SNP-haplotype-or-QTL-information" style="-x-system-font: none; display: block; font-family: Helvetica,Arial,Sans-serif; font-size-adjust: none; font-size: 14px; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 12px auto 6px auto; text-decoration: underline;" title="View Whole-genome evaluation of complex traits using SNP, haplotype, or QTL information on Scribd"&gt;Whole-genome evaluation of complex traits using SNP, haplotype, or QTL information&lt;/a&gt;&lt;iframe class="scribd_iframe_embed" data-aspect-ratio="1.33333333333333" data-auto-height="true" frameborder="0" height="600" id="doc_90707" scrolling="no" src="http://www.scribd.com/embeds/108439861/content?start_page=1&amp;amp;view_mode=slideshow&amp;amp;access_key=key-2m2zvs95fz68w9715p05" width="100%"&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;br /&gt;
Abstract:&lt;br /&gt;
&lt;br /&gt;
&lt;div align="JUSTIFY" style="margin-bottom: 0in;"&gt;
&lt;span lang="en-GB"&gt;Whole-genome
technologies provide rich &lt;/span&gt;&lt;span lang="en-GB"&gt;data for
dissection of complex traits. While gene discovery is still largely
limited, the data at hand can be successfully used for evaluation of
genetic merit. The aim of this work was to demonstrate the value of
different sources of information (pedigrees, Single Nucleotide
Polymorphisms – SNP, haplotypes, or Quantitative Trait Loci –
QTL) for genetic evaluation of non-phenotyped individuals in a
typical animal breeding scenario via simulation. In the first step a
coalescent simulation was used to create a base population with
structured chromosomes that were in the second step dropped and
recombined through the pedigree of 10 generations with 50 sires per
generation, 10 dams per sire, and 2 offspring per dam. Phenotypic
values were simulated with different genetic architectures (QTL
effects were sampled from Gaussian or gamma distribution and minor
allele frequency less than 0.3) and heritability of 0.25. Genotypic
data was available for all individuals from generation 4 onwards,
while phenotypic data was available for individuals in generations 4
and 5. Genetic evaluation was based on linear mixed models with
relationship matrix between individuals. This matrix was built using
pedigree, SNP, haplotype, or QTL data. Haplotypes of different length
were considered (from 5 to all the way up to 2000 SNP) with an option
to account for similarities between haplotypes while building
relationship matrices. The accuracy of different methods was assessed
by correlation between true and evaluated additive genetic values for
individuals in generations 6, 8 and 10. Average accuracy over ten
replications for Gaussian trait over generations was between 0.45 to
0.10 for pedigree data, 0.50 to 0.35 for SNP and haplotype data and
0.6 to 0.4 for QTL data. In the case of long haplotypes accuracies
dropped considerably, but accounting for similarities between
haplotypes prevented this drop. In the case of gamma trait accuracies
were slightly higher in generation 6 and dropped faster in the later
generations in the case of pedigree, SNP, and haplotype data due to
recombinations. On the other hand accuracies were substantially
higher with QTL data and quite stable over generations (from 0.75 to
0.65) though still far from perfect (even though QTL genotypes are
known), due to estimation errors. Results demonstrate the value and
limitations of genotypic information for the evaluation of additive
genetic merit in animal populations.&lt;/span&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/Wh2Z7hyJJEE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/Wh2Z7hyJJEE/whole-genome-evaluation-of-complex.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/09/whole-genome-evaluation-of-complex.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-6997001599047389095</guid><pubDate>Sat, 29 Sep 2012 00:00:00 +0000</pubDate><atom:updated>2012-09-29T02:00:52.703+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">genetics</category><category domain="http://www.blogger.com/atom/ns#">animalScience</category><category domain="http://www.blogger.com/atom/ns#">web</category><title>Software Tools for Animal Gene Mapping</title><description>&lt;a href="http://animalgene.umn.edu/"&gt;Here&lt;/a&gt; are some cool tools for animal genetics:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;AGDP for the analysis of genome differences between opulations&lt;/li&gt;
&lt;li&gt;SNPEVG graphical tool for SNP effect viewing and graphing&lt;/li&gt;
&lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/uvXEEMmJ4Yk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/uvXEEMmJ4Yk/software-tools-for-animal-gene-mapping.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/09/software-tools-for-animal-gene-mapping.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-962237689151114990</guid><pubDate>Sun, 23 Sep 2012 15:02:00 +0000</pubDate><atom:updated>2012-09-23T17:02:01.012+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">computers</category><category domain="http://www.blogger.com/atom/ns#">web</category><title>Google drive drives in </title><description>&lt;div style="text-align: justify;"&gt;
I just realized that Google offers me "Google drive". The &lt;a href="https://support.google.com/drive/bin/answer.py?hl=en&amp;amp;answer=2375123&amp;amp;p=mktg_pricing"&gt;pricing options&lt;/a&gt;&amp;nbsp;for larger disk space than 5GB are very competitive with Dropbox! I am using Dropbox for all my files - yes, it costs me quite some money when the bill comes, but if we consider this is "few" dollars per month for backup and synchronization I am more than willing to pay this amount for this!!! Google drives is now yet another option, but the desktop folder does not work on Linux so for now I will stick with Dropbox.&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/ShE82onNnQ0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/ShE82onNnQ0/google-drive-drives-in.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/09/google-drive-drives-in.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-242595025397355617</guid><pubDate>Mon, 20 Aug 2012 14:34:00 +0000</pubDate><atom:updated>2012-08-20T16:34:58.020+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">genetics</category><category domain="http://www.blogger.com/atom/ns#">animalScience</category><category domain="http://www.blogger.com/atom/ns#">web</category><title>AIPL presentations on animal breeding and genetics/genomics</title><description>You can find &lt;a href="http://aipl.arsusda.gov/publish/present.htm"&gt;here&lt;/a&gt; some top-notch presentations on animal breeding and genetics/genomics.&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/jYjGtrmXCRU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/jYjGtrmXCRU/aipl-presentations-on-animal-breeding.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/08/aipl-presentations-on-animal-breeding.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-4121526439930832128</guid><pubDate>Sat, 11 Aug 2012 11:01:00 +0000</pubDate><atom:updated>2012-08-11T13:01:43.896+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">genetics</category><category domain="http://www.blogger.com/atom/ns#">study</category><title>“Livestock Conservation Genomics: Data, Tools and Trends“ Summer School, Croatia, Oct 1-7, 2012</title><description>There will be an ESF GENOMIC-RESOURCES (&lt;a href="http://www.esf.org/index.php?id=7009"&gt;link1&lt;/a&gt;, &lt;a href="http://genomic-resources.epfl.ch/"&gt;link2&lt;/a&gt;) summer school “Livestock Conservation Genomics: Data, Tools and Trends“ Summer School, Croatia, Oct 1-7, 2012. You can find more details &lt;a href="http://www.agr.unizg.hr/files/lcd_2012.pdf"&gt;here&lt;/a&gt;.&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/oU3wjVy901s" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/oU3wjVy901s/livestock-conservation-genomics-data.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/08/livestock-conservation-genomics-data.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-4190587957162924397</guid><pubDate>Thu, 09 Aug 2012 14:32:00 +0000</pubDate><atom:updated>2012-08-09T16:32:00.364+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">genetics</category><title>Nice SNP tools from the Pevsner laboratory</title><description>&lt;a href="http://pevsnerlab.kennedykrieger.org/SNPduo"&gt;SNPduo&lt;/a&gt; - compare SNPs from two individuals&lt;br /&gt;
&lt;a href="http://pevsnerlab.kennedykrieger.org/SNPtrio.htm"&gt;SNPtrio&lt;/a&gt; - compare SNPs from a family trio - very cool plots and nice diagnostics&lt;br /&gt;
&lt;a href="http://pevsnerlab.kennedykrieger.org/kcoeff.html"&gt;kcoeff&lt;/a&gt; - estimate K0, K1, and K2 coefficients from SNP data&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/ZIgUSZIMfMk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/ZIgUSZIMfMk/nice-snp-tools-from-pevsner-laboratory.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/08/nice-snp-tools-from-pevsner-laboratory.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-8467826430660489277</guid><pubDate>Wed, 08 Aug 2012 21:58:00 +0000</pubDate><atom:updated>2012-08-08T23:58:18.652+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">genetics</category><category domain="http://www.blogger.com/atom/ns#">animalScience</category><title>EU FP7 Livestock Genomics projects</title><description>The &lt;a href="http://www.quantomics.eu/"&gt;Quantomics&lt;/a&gt; group had a meeting in September 2011 and published was a very nice set of &lt;a href="http://www.quantomics.eu/european-livestock-genomics-projects"&gt;presentations&lt;/a&gt; on&amp;nbsp;EU FP7 Livestock Genomics projects.&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/7iTtBqf1UEE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/7iTtBqf1UEE/eu-fp7-livestock-genomics-projects.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/08/eu-fp7-livestock-genomics-projects.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-7901632912886981829</guid><pubDate>Sat, 30 Jun 2012 15:07:00 +0000</pubDate><atom:updated>2012-06-30T17:08:41.688+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">video</category><category domain="http://www.blogger.com/atom/ns#">genetics</category><category domain="http://www.blogger.com/atom/ns#">animalScience</category><category domain="http://www.blogger.com/atom/ns#">talks</category><title>InterBull and ICAR talks from Cork</title><description>Follow links bellow to see slides and videos!&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;ICAR: &lt;a href="http://www.icar2012.ie/presentations/videos/T1_6_30_5_2012_Gregor_Gorjanc/T1_6_30_5_2012_Gregor_Gorjanc.html"&gt;Partitioning international genetic trends by origin in Holstein bulls&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;InterBull: &lt;a href="http://www.icar2012.ie/presentations/videos/IBOM2_6_29_5_2012_Gregor_Gorjanc/IBOM2_6_29_5_2012_Gregor_Gorjanc.html"&gt;Accuracy of breeding values from pedigree and genome based models in selected populations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
Other talks as are available from &lt;a href="http://www.icar.org/cork_2012/"&gt;here&lt;/a&gt;. &lt;br /&gt;
&lt;ul&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/6Dok1l-f3aI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/6Dok1l-f3aI/interbull-and-icar-talks-from-cork.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/06/interbull-and-icar-talks-from-cork.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-982767865466332159</guid><pubDate>Wed, 06 Jun 2012 11:38:00 +0000</pubDate><atom:updated>2012-06-06T13:38:26.509+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">R</category><title>2 min HOWTO in R</title><description>Lots of &lt;a href="http://www.twotorials.com/"&gt;short videos&lt;/a&gt; on how to do several things in R.&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/7vuPOU2uzEs" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/7vuPOU2uzEs/2-min-howto-in-r.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/06/2-min-howto-in-r.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-2736611306636824391</guid><pubDate>Tue, 22 May 2012 11:18:00 +0000</pubDate><atom:updated>2012-05-22T13:18:01.191+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">video</category><category domain="http://www.blogger.com/atom/ns#">genetics</category><category domain="http://www.blogger.com/atom/ns#">animalScience</category><title>Animal breeding and genetics progress video</title><description>See &lt;a href="http://www.youtube.com/watch?v=6B-CH-NCdiY"&gt;here&lt;/a&gt;.&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/0qHkprpdYRY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/0qHkprpdYRY/animal-breeding-and-genetics-progress.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/05/animal-breeding-and-genetics-progress.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-2825806694990417245</guid><pubDate>Sat, 21 Apr 2012 09:14:00 +0000</pubDate><atom:updated>2012-10-24T12:17:13.444+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">video</category><title>Some more study video material</title><description>&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/user/mathematicalmonk/videos?view=1"&gt;Mathematical Monk channel&lt;/a&gt; featuring Information Theory, Machine Learning, and Probability&amp;nbsp;Primer&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.coursera.org/"&gt;Coursera&lt;/a&gt; featuring loads of material from Princeton, Stanford, Michigan, and Penn&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.udacity.com/courses"&gt;Udacity&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/1G92uAhOpN8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/1G92uAhOpN8/some-more-study-video-material.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/04/some-more-study-video-material.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-4215120975657976525</guid><pubDate>Tue, 17 Apr 2012 14:27:00 +0000</pubDate><atom:updated>2012-04-17T16:27:23.626+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">writings</category><category domain="http://www.blogger.com/atom/ns#">genetics</category><title>Simulated data for genomic selection and GWAS using a combination of coalescent and gene drop methods</title><description>&lt;div style="text-align: justify;"&gt;
Our (Hickey and Gorjanc) &lt;a href="http://www.g3journal.org/content/2/4/425.full"&gt;paper&lt;/a&gt; describing simulation using coalescent and gene drop methods has been published in the new open G3 journal. This contribution is a part of the &lt;a href="http://www.genetics.org/site/misc/GenomicSelection.xhtml"&gt;Genomic selection collection of the Genetic Society of America&lt;/a&gt; that is nicely described &lt;a href="http://www.genetics.org/content/190/4/1151.full"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/YCTf8U_64yI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/YCTf8U_64yI/simulated-data-for-genomic-selection.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>3</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/04/simulated-data-for-genomic-selection.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-4549391681255708636</guid><pubDate>Sat, 14 Apr 2012 23:07:00 +0000</pubDate><atom:updated>2012-04-15T01:08:10.592+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">graphics</category><category domain="http://www.blogger.com/atom/ns#">web</category><title>Chalk letter generator</title><description>&lt;a href="http://www.addletters.com/bart-simpson-generator.htm"&gt;Here&lt;/a&gt; is a cool online application that takes chalkboard with&amp;nbsp;Bart Simpsons&amp;nbsp;and adds your text on it.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.addletters.com/pictures/bart-simpson-generator/bart-simpson-generator.php?line=I+will+tell+all+of+my+friends+about+addletters.com+today%21" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="171" src="http://www.addletters.com/pictures/bart-simpson-generator/bart-simpson-generator.php?line=I+will+tell+all+of+my+friends+about+addletters.com+today%21" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/fZ1iT7T6x3w" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/fZ1iT7T6x3w/chalk-letter-generator.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/04/chalk-letter-generator.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6715598735361401237.post-3917887924461505469</guid><pubDate>Sun, 08 Apr 2012 17:14:00 +0000</pubDate><atom:updated>2012-04-08T19:14:34.218+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">statistics</category><category domain="http://www.blogger.com/atom/ns#">genetics</category><category domain="http://www.blogger.com/atom/ns#">graphics</category><category domain="http://www.blogger.com/atom/ns#">R</category><title>Small pedigree based mixed model example</title><description>&lt;div style="text-align: justify;"&gt;
Pedigree based mixed models (often called animal models, due to modelling animal performance) are the cornerstone of animal breeding and&amp;nbsp;quantitative genetics. There are many programs that can be used for analyzing your data with these models, e.g., &lt;a href="http://www.vsni.co.uk/software/asreml"&gt;ASREML&lt;/a&gt;, &lt;a href="http://nce.ads.uga.edu/~ignacy/newprograms.html"&gt;BLUPf90&lt;/a&gt;,&amp;nbsp;&lt;a href="http://statistics.unl.edu/faculty/steve/software/matvec/"&gt;MATVEC&lt;/a&gt;, &lt;a href="http://www.mixblup.eu/"&gt;MiXBLUP&lt;/a&gt; &amp;amp; &lt;a href="https://portal.mtt.fi/portal/page/portal/mtt_en/mtt/research/expertise/bel/biometricalgenetics/software/MiX99"&gt;MiX99&lt;/a&gt;, &amp;nbsp;&lt;a href="http://www4.jouy.inra.fr/gabi_eng/Our-resources/Tool-development/The-Survival-Kit"&gt;SurvivalKit&lt;/a&gt;, PEST/VCE, &lt;a href="http://didgeridoo.une.edu.au/km/wombat.php"&gt;WOMBAT&lt;/a&gt;, ...). There are also R packages you can use: &lt;a href="http://cran.r-project.org/package=pedigreemm"&gt;pedigreemm&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://cran.r-project.org/package=MCMCglmm"&gt;MCMCglmm&lt;/a&gt;.&amp;nbsp;If you want to run your own program you can take the example code bellow and start from it. The code shows the essence of&amp;nbsp;building&amp;nbsp;the system of equations that needs to be solved on a simple example. Note that this is mean only for demonstration purposes and small scale analyses. In addition, variance components are assumed known here. In order to understand the model for this simple example a bit better the graphical model view is shown first.&lt;/div&gt;
&lt;a href="http://www.scribd.com/doc/88476113/Graphical-model-view-of-simple-pedigree-based-mixed-model-example" style="display: block; font-family: Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin-bottom: 6px; margin-left: auto; margin-right: auto; margin-top: 12px; text-align: center; text-decoration: underline;" title="View Graphical model view of simple pedigree based mixed model example on Scribd"&gt;Graphical model view of simple pedigree based mixed model example&lt;/a&gt;&lt;iframe class="scribd_iframe_embed" data-aspect-ratio="0.633333333333333" data-auto-height="true" frameborder="0" height="600" id="doc_99624" scrolling="no" src="http://www.scribd.com/embeds/88476113/content?start_page=1&amp;amp;view_mode=slideshow&amp;amp;access_key=key-vokrg8ej1hz95wsiadw" width="100%"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;The code:&lt;/b&gt;
&lt;br /&gt;
&lt;div style="overflow: auto;"&gt;
&lt;div class="geshifilter"&gt;
&lt;pre class="r geshifilter-R" style="font-family: monospace;"&gt;&lt;/pre&gt;
&lt;pre class="r geshifilter-R" style="font-family: monospace;"&gt;
&lt;/pre&gt;
&lt;pre class="r geshifilter-R" style="font-family: monospace;"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;&lt;a href="http://inside-r.org/r-doc/base/options"&gt;options&lt;/a&gt;&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;width=&lt;span style="color: #cc66cc;"&gt;200&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;### --- Required packages ---&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## install.packages(pkg=c("pedigreemm", "MatrixModels"))&lt;/span&gt;
&amp;nbsp;
&lt;a href="http://inside-r.org/r-doc/base/library"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;library&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;package=&lt;span style="color: blue;"&gt;"pedigreemm"&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;   &lt;span style="color: #666666; font-style: italic;"&gt;## pedigree functions&lt;/span&gt;
&lt;a href="http://inside-r.org/r-doc/base/library"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;library&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;package=&lt;span style="color: blue;"&gt;"MatrixModels"&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #666666; font-style: italic;"&gt;## sparse matrices&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;### --- Data ---&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## NOTE:&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;## - some individuals have one or both parents (un)known&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;## - some individuals have phenotype (un)known&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;## - some indididuals have repeated phenotype observations &lt;/span&gt;
&lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt; &amp;lt;- &lt;a href="http://inside-r.org/r-doc/base/data.frame"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;data.frame&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;
  individual=&lt;a href="http://inside-r.org/r-doc/base/c"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;4&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;5&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;6&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;7&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;8&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;9&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;10&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
      father=&lt;a href="http://inside-r.org/r-doc/base/c"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;4&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;5&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;5&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;8&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
      mother=&lt;a href="http://inside-r.org/r-doc/base/c"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;6&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;6&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;9&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
   phenotype=&lt;a href="http://inside-r.org/r-doc/base/c"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;103&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;106&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;98&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;101&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;106&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;93&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;109&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
       &lt;a href="http://inside-r.org/r-doc/grDevices/group"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;group&lt;/span&gt;&lt;/a&gt;=&lt;a href="http://inside-r.org/r-doc/base/c"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## Variance components&lt;/span&gt;
sigma2e &amp;lt;- &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;
sigma2a &amp;lt;- &lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;
&lt;span style="color: #009900;"&gt;(&lt;/span&gt;h2 &amp;lt;- sigma2a / &lt;span style="color: #009900;"&gt;(&lt;/span&gt;sigma2a + sigma2e&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;### --- Setup data ---&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## Make sure each individual has only one record in pedigree&lt;/span&gt;
ped &amp;lt;- &lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;[&lt;/span&gt;!&lt;a href="http://inside-r.org/r-doc/base/duplicated"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;duplicated&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt;$individual&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;:&lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## Factors (this eases buliding the design matrix considerably)&lt;/span&gt;
&lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt;$individual &amp;lt;- &lt;a href="http://inside-r.org/r-doc/base/factor"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;factor&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt;$individual&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt;$group      &amp;lt;- &lt;a href="http://inside-r.org/r-doc/base/factor"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;factor&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt;$group&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## Phenotype data&lt;/span&gt;
dat &amp;lt;- &lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;[&lt;/span&gt;!&lt;a href="http://inside-r.org/r-doc/base/is.na"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;is.na&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt;$phenotype&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #009900;"&gt;]&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;### --- Setup MME ---&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## Phenotype vector&lt;/span&gt;
&lt;span style="color: #009900;"&gt;(&lt;/span&gt;y &amp;lt;- dat$phenotype&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## Design matrix for the "fixed" effects (group)&lt;/span&gt;
&lt;span style="color: #009900;"&gt;(&lt;/span&gt;X &amp;lt;- model.Matrix&lt;span style="color: #009900;"&gt;(&lt;/span&gt; ~ &lt;a href="http://inside-r.org/r-doc/grDevices/group"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;group&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;          &lt;a href="http://inside-r.org/r-doc/utils/data"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;data&lt;/span&gt;&lt;/a&gt;=dat&lt;span style="color: #339933;"&gt;,&lt;/span&gt; sparse=&lt;span style="color: black; font-weight: bold;"&gt;TRUE&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## Design matrix for the "random" effects (individual)&lt;/span&gt;
&lt;span style="color: #009900;"&gt;(&lt;/span&gt;Z &amp;lt;- model.Matrix&lt;span style="color: #009900;"&gt;(&lt;/span&gt;~ individual - &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;a href="http://inside-r.org/r-doc/utils/data"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;data&lt;/span&gt;&lt;/a&gt;=dat&lt;span style="color: #339933;"&gt;,&lt;/span&gt; sparse=&lt;span style="color: black; font-weight: bold;"&gt;TRUE&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## Inverse additive relationship matrix&lt;/span&gt;
ped2 &amp;lt;- &lt;a href="http://inside-r.org/packages/cran/pedigree"&gt;pedigree&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;sire=ped$father&lt;span style="color: #339933;"&gt;,&lt;/span&gt; dam=ped$mother&lt;span style="color: #339933;"&gt;,&lt;/span&gt; label=ped$individual&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
TInv &amp;lt;- &lt;a href="http://inside-r.org/r-doc/methods/as"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;as&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;ped2&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: blue;"&gt;"sparseMatrix"&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
DInv &amp;lt;- &lt;a href="http://inside-r.org/r-doc/Matrix/Diagonal"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;Diagonal&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;x=&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;/Dmat&lt;span style="color: #009900;"&gt;(&lt;/span&gt;ped2&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
AInv &amp;lt;- &lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/base/sqrt"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;sqrt&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;DInv&lt;span style="color: #009900;"&gt;)&lt;/span&gt; %*% TInv&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## Variance ratio&lt;/span&gt;
alpha &amp;lt;- sigma2e / sigma2a
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## Mixed Model Equations (MME)&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## ... Left-Hand Side (LHS) without pedigree prior&lt;/span&gt;
&lt;span style="color: #009900;"&gt;(&lt;/span&gt;LHS0 &amp;lt;- rBind&lt;span style="color: #009900;"&gt;(&lt;/span&gt;cBind&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;X&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;    &lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;X&lt;span style="color: #339933;"&gt;,&lt;/span&gt; Z&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
               cBind&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;Z&lt;span style="color: #339933;"&gt;,&lt;/span&gt; X&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;Z&lt;span style="color: #339933;"&gt;,&lt;/span&gt; Z&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## ... Left-Hand Side (LHS) with    pedigree prior&lt;/span&gt;
&lt;a href="http://inside-r.org/r-doc/base/round"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;round&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;
 &lt;a href="http://inside-r.org/packages/cran/lhs"&gt;LHS&lt;/a&gt; &amp;lt;- rBind&lt;span style="color: #009900;"&gt;(&lt;/span&gt;cBind&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;X&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;    &lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;X&lt;span style="color: #339933;"&gt;,&lt;/span&gt; Z&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
              cBind&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;Z&lt;span style="color: #339933;"&gt;,&lt;/span&gt; X&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;Z&lt;span style="color: #339933;"&gt;,&lt;/span&gt; Z&lt;span style="color: #009900;"&gt;)&lt;/span&gt; + AInv * alpha&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; digits=&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## ... Right-Hand Side (RHS)&lt;/span&gt;
&lt;span style="color: #009900;"&gt;(&lt;/span&gt;RHS &amp;lt;- rBind&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;X&lt;span style="color: #339933;"&gt;,&lt;/span&gt; y&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
              &lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;Z&lt;span style="color: #339933;"&gt;,&lt;/span&gt; y&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;### --- Solutions ---&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## Solve&lt;/span&gt;
LHSInv &amp;lt;- &lt;a href="http://inside-r.org/r-doc/base/solve"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;solve&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/packages/cran/lhs"&gt;LHS&lt;/a&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
sol &amp;lt;- LHSInv %*% RHS
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## Standard errors&lt;/span&gt;
se &amp;lt;- &lt;a href="http://inside-r.org/r-doc/base/diag"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;diag&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;LHSInv&lt;span style="color: #009900;"&gt;)&lt;/span&gt; * sigma2e
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## Reliabilities&lt;/span&gt;
r2 &amp;lt;- &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; - &lt;a href="http://inside-r.org/r-doc/base/diag"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;diag&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;LHSInv&lt;span style="color: #009900;"&gt;)&lt;/span&gt; * alpha
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## Accuracies&lt;/span&gt;
r &amp;lt;- &lt;a href="http://inside-r.org/r-doc/base/sqrt"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;sqrt&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;r2&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #666666; font-style: italic;"&gt;## Printout&lt;/span&gt;
cBind&lt;span style="color: #009900;"&gt;(&lt;/span&gt;sol&lt;span style="color: #339933;"&gt;,&lt;/span&gt; se&lt;span style="color: #339933;"&gt;,&lt;/span&gt; r&lt;span style="color: #339933;"&gt;,&lt;/span&gt; r2&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;a href="http://www.inside-r.org/pretty-r" title="Created by Pretty R at inside-R.org"&gt;Created by Pretty R at inside-R.org&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;b&gt;And the transcript:&lt;/b&gt;&lt;/div&gt;
&lt;div style="overflow: auto;"&gt;
&lt;div class="geshifilter"&gt;
&lt;pre class="r geshifilter-R" style="font-family: monospace;"&gt;&lt;/pre&gt;
&lt;pre class="r geshifilter-R" style="font-family: monospace;"&gt;R &lt;a href="http://inside-r.org/r-doc/base/version"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;version&lt;/span&gt;&lt;/a&gt; 2.14.2 &lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;2012&lt;/span&gt;-02-&lt;span style="color: #cc66cc;"&gt;29&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
Copyright &lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/stats/C"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;C&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;2012&lt;/span&gt; The R Foundation &lt;span style="color: black; font-weight: bold;"&gt;for&lt;/span&gt; Statistical Computing
ISBN &lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;-&lt;span style="color: #cc66cc;"&gt;900051&lt;/span&gt;-07-&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;
&lt;a href="http://inside-r.org/r-doc/base/Platform"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;Platform&lt;/span&gt;&lt;/a&gt;: x86_64-pc-linux-gnu &lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;64&lt;/span&gt;-&lt;a href="http://inside-r.org/packages/cran/bit"&gt;bit&lt;/a&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;nbsp;
R &lt;a href="http://inside-r.org/r-doc/methods/is"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;is&lt;/span&gt;&lt;/a&gt; free software and comes &lt;a href="http://inside-r.org/r-doc/base/with"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;with&lt;/span&gt;&lt;/a&gt; ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type &lt;span style="color: blue;"&gt;'license()'&lt;/span&gt; or &lt;span style="color: blue;"&gt;'licence()'&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;for&lt;/span&gt; distribution details.
&amp;nbsp;
  Natural language support but running &lt;span style="color: black; font-weight: bold;"&gt;in&lt;/span&gt; an English locale
&amp;nbsp;
R &lt;a href="http://inside-r.org/r-doc/methods/is"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;is&lt;/span&gt;&lt;/a&gt; a collaborative project &lt;a href="http://inside-r.org/r-doc/base/with"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;with&lt;/span&gt;&lt;/a&gt; many contributors.
Type &lt;span style="color: blue;"&gt;'contributors()'&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;for&lt;/span&gt; more information and
&lt;span style="color: blue;"&gt;'citation()'&lt;/span&gt; on how to cite R or R packages &lt;span style="color: black; font-weight: bold;"&gt;in&lt;/span&gt; publications.
&amp;nbsp;
Type &lt;span style="color: blue;"&gt;'demo()'&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;for&lt;/span&gt; some demos&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: blue;"&gt;'help()'&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;for&lt;/span&gt; on-&lt;a href="http://inside-r.org/r-doc/stats/line"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;line&lt;/span&gt;&lt;/a&gt; &lt;a href="http://inside-r.org/r-doc/utils/help"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;help&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; or
&lt;span style="color: blue;"&gt;'help.start()'&lt;/span&gt; &lt;span style="color: black; font-weight: bold;"&gt;for&lt;/span&gt; an HTML &lt;a href="http://inside-r.org/r-doc/base/browser"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;browser&lt;/span&gt;&lt;/a&gt; interface to help.
Type &lt;span style="color: blue;"&gt;'q()'&lt;/span&gt; to &lt;a href="http://inside-r.org/r-doc/base/quit"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;quit&lt;/span&gt;&lt;/a&gt; R.
&amp;nbsp;
&lt;span style="color: #009900;"&gt;[&lt;/span&gt;Previously saved workspace restored&lt;span style="color: #009900;"&gt;]&lt;/span&gt;
&amp;nbsp;
&amp;gt; 
&amp;gt; &lt;a href="http://inside-r.org/r-doc/base/options"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;options&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;width=&lt;span style="color: #cc66cc;"&gt;200&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;### --- Required packages ---&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## install.packages(pkg=c("pedigreemm", "MatrixModels"))&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;a href="http://inside-r.org/r-doc/base/library"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;library&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;package=&lt;span style="color: blue;"&gt;"pedigreemm"&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;   &lt;span style="color: #666666; font-style: italic;"&gt;## pedigree functions&lt;/span&gt;
Loading required package: &lt;a href="http://inside-r.org/packages/cran/lme4"&gt;lme4&lt;/a&gt;
Loading required package: &lt;a href="http://inside-r.org/r-doc/Matrix/Matrix"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;Matrix&lt;/span&gt;&lt;/a&gt;
Loading required package: &lt;a href="http://inside-r.org/packages/cran/lattice"&gt;lattice&lt;/a&gt;
&amp;nbsp;
Attaching package: ‘&lt;a href="http://inside-r.org/r-doc/Matrix/Matrix"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;Matrix&lt;/span&gt;&lt;/a&gt;’
&amp;nbsp;
The following object&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/mgcv/s"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;s&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; are masked from ‘package:&lt;a href="http://inside-r.org/r-doc/base"&gt;&lt;span style="color: #006600; font-weight: bold;"&gt;base&lt;/span&gt;&lt;/a&gt;’:
&amp;nbsp;
    &lt;a href="http://inside-r.org/r-doc/base/det"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;det&lt;/span&gt;&lt;/a&gt;
&amp;nbsp;
&amp;nbsp;
Attaching package: ‘&lt;a href="http://inside-r.org/packages/cran/lme4"&gt;lme4&lt;/a&gt;’
&amp;nbsp;
The following object&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/mgcv/s"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;s&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; are masked from ‘package:&lt;a href="http://inside-r.org/r-doc/stats"&gt;&lt;span style="color: #006600; font-weight: bold;"&gt;stats&lt;/span&gt;&lt;/a&gt;’:
&amp;nbsp;
    &lt;a href="http://inside-r.org/r-doc/stats/AIC"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;AIC&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;a href="http://inside-r.org/r-doc/nlme/BIC"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;BIC&lt;/span&gt;&lt;/a&gt;
&amp;nbsp;
&amp;gt; &lt;a href="http://inside-r.org/r-doc/base/library"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;library&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;package=&lt;span style="color: blue;"&gt;"MatrixModels"&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #666666; font-style: italic;"&gt;## sparse matrices&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;### --- Data ---&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## NOTE:&lt;/span&gt;
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## - some individuals have one or both parents (un)known&lt;/span&gt;
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## - some individuals have phenotype (un)known&lt;/span&gt;
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## - some indididuals have repeated phenotype observations &lt;/span&gt;
&amp;gt; &lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt; &amp;lt;- &lt;a href="http://inside-r.org/r-doc/base/data.frame"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;data.frame&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;
+   individual=&lt;a href="http://inside-r.org/r-doc/base/c"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;4&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;5&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;6&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;7&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;8&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;9&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;10&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
+       father=&lt;a href="http://inside-r.org/r-doc/base/c"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;4&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;5&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;5&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;8&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
+       mother=&lt;a href="http://inside-r.org/r-doc/base/c"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;6&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;6&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;9&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
+    phenotype=&lt;a href="http://inside-r.org/r-doc/base/c"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;103&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;106&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;98&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;101&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;106&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;93&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;109&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
+        &lt;a href="http://inside-r.org/r-doc/grDevices/group"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;group&lt;/span&gt;&lt;/a&gt;=&lt;a href="http://inside-r.org/r-doc/base/c"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;  &lt;span style="color: black; font-weight: bold;"&gt;NA&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## Variance components&lt;/span&gt;
&amp;gt; sigma2e &amp;lt;- &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;
&amp;gt; sigma2a &amp;lt;- &lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;
&amp;gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;h2 &amp;lt;- sigma2a / &lt;span style="color: #009900;"&gt;(&lt;/span&gt;sigma2a + sigma2e&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0.75&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;### --- Setup data ---&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## Make sure each individual has only one record in pedigree&lt;/span&gt;
&amp;gt; ped &amp;lt;- &lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;[&lt;/span&gt;!&lt;a href="http://inside-r.org/r-doc/base/duplicated"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;duplicated&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt;$individual&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;:&lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## Factors (this eases buliding the design matrix considerably)&lt;/span&gt;
&amp;gt; &lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt;$individual &amp;lt;- &lt;a href="http://inside-r.org/r-doc/base/factor"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;factor&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt;$individual&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;gt; &lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt;$group      &amp;lt;- &lt;a href="http://inside-r.org/r-doc/base/factor"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;factor&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt;$group&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## Phenotype data&lt;/span&gt;
&amp;gt; dat &amp;lt;- &lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;[&lt;/span&gt;!&lt;a href="http://inside-r.org/r-doc/base/is.na"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;is.na&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/utils/example"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;example&lt;/span&gt;&lt;/a&gt;$phenotype&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #009900;"&gt;]&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;### --- Setup MME ---&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## Phenotype vector&lt;/span&gt;
&amp;gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;y &amp;lt;- dat$phenotype&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;103&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;106&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;98&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;101&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;106&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;93&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;109&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## Design matrix for the "fixed" effects (group)&lt;/span&gt;
&amp;gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;X &amp;lt;- model.Matrix&lt;span style="color: #009900;"&gt;(&lt;/span&gt; ~ &lt;a href="http://inside-r.org/r-doc/grDevices/group"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;group&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;          &lt;a href="http://inside-r.org/r-doc/utils/data"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;data&lt;/span&gt;&lt;/a&gt;=dat&lt;span style="color: #339933;"&gt;,&lt;/span&gt; sparse=&lt;span style="color: black; font-weight: bold;"&gt;TRUE&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&lt;span style="color: blue;"&gt;"dsparseModelMatrix"&lt;/span&gt;: &lt;span style="color: #cc66cc;"&gt;7&lt;/span&gt; x &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt; sparse &lt;a href="http://inside-r.org/r-doc/Matrix/Matrix"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;Matrix&lt;/span&gt;&lt;/a&gt; of &lt;a href="http://inside-r.org/r-doc/base/class"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;class&lt;/span&gt;&lt;/a&gt; &lt;span style="color: blue;"&gt;"dgCMatrix"&lt;/span&gt;
   &lt;span style="color: #009900;"&gt;(&lt;/span&gt;Intercept&lt;span style="color: #009900;"&gt;)&lt;/span&gt; group2
&lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;            &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;      .
&lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;            &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;      .
&lt;span style="color: #cc66cc;"&gt;4&lt;/span&gt;            &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;      .
&lt;span style="color: #cc66cc;"&gt;5&lt;/span&gt;            &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;      &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;
&lt;span style="color: #cc66cc;"&gt;6&lt;/span&gt;            &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;      &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;
&lt;span style="color: #cc66cc;"&gt;7&lt;/span&gt;            &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;      &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;
&lt;span style="color: #cc66cc;"&gt;11&lt;/span&gt;           &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;      .
@ &lt;a href="http://inside-r.org/r-doc/base/assign"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;assign&lt;/span&gt;&lt;/a&gt;:  &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; 
@ &lt;a href="http://inside-r.org/r-doc/stats/contrasts"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;contrasts&lt;/span&gt;&lt;/a&gt;:
$group
&lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt; &lt;span style="color: blue;"&gt;"contr.treatment"&lt;/span&gt;
&amp;nbsp;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## Design matrix for the "random" effects (individual)&lt;/span&gt;
&amp;gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;Z &amp;lt;- model.Matrix&lt;span style="color: #009900;"&gt;(&lt;/span&gt;~ individual - &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;a href="http://inside-r.org/r-doc/utils/data"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;data&lt;/span&gt;&lt;/a&gt;=dat&lt;span style="color: #339933;"&gt;,&lt;/span&gt; sparse=&lt;span style="color: black; font-weight: bold;"&gt;TRUE&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&lt;span style="color: blue;"&gt;"dsparseModelMatrix"&lt;/span&gt;: &lt;span style="color: #cc66cc;"&gt;7&lt;/span&gt; x &lt;span style="color: #cc66cc;"&gt;10&lt;/span&gt; sparse &lt;a href="http://inside-r.org/r-doc/Matrix/Matrix"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;Matrix&lt;/span&gt;&lt;/a&gt; of &lt;a href="http://inside-r.org/r-doc/base/class"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;class&lt;/span&gt;&lt;/a&gt; &lt;span style="color: blue;"&gt;"dgCMatrix"&lt;/span&gt;
   &lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #009900;"&gt;[&lt;/span&gt; suppressing &lt;span style="color: #cc66cc;"&gt;10&lt;/span&gt; column &lt;a href="http://inside-r.org/r-doc/base/names"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;names&lt;/span&gt;&lt;/a&gt; ‘individual1’&lt;span style="color: #339933;"&gt;,&lt;/span&gt; ‘individual2’&lt;span style="color: #339933;"&gt;,&lt;/span&gt; ‘individual3’ ... &lt;span style="color: #009900;"&gt;]&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;  . &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . . . . . . . .
&lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;  . &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . . . . . . . .
&lt;span style="color: #cc66cc;"&gt;4&lt;/span&gt;  . . &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . . . . . . .
&lt;span style="color: #cc66cc;"&gt;5&lt;/span&gt;  . . . &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . . . . . .
&lt;span style="color: #cc66cc;"&gt;6&lt;/span&gt;  . . . . &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . . . . .
&lt;span style="color: #cc66cc;"&gt;7&lt;/span&gt;  . . . . . &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . . . .
&lt;span style="color: #cc66cc;"&gt;11&lt;/span&gt; . . . . . . . . . &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;
@ &lt;a href="http://inside-r.org/r-doc/base/assign"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;assign&lt;/span&gt;&lt;/a&gt;:  &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; 
@ &lt;a href="http://inside-r.org/r-doc/stats/contrasts"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;contrasts&lt;/span&gt;&lt;/a&gt;:
$individual
&lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt; &lt;span style="color: blue;"&gt;"contr.treatment"&lt;/span&gt;
&amp;nbsp;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## Inverse additive relationship matrix&lt;/span&gt;
&amp;gt; ped2 &amp;lt;- &lt;a href="http://inside-r.org/packages/cran/pedigree"&gt;pedigree&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;sire=ped$father&lt;span style="color: #339933;"&gt;,&lt;/span&gt; dam=ped$mother&lt;span style="color: #339933;"&gt;,&lt;/span&gt; label=ped$individual&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;gt; TInv &amp;lt;- &lt;a href="http://inside-r.org/r-doc/methods/as"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;as&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;ped2&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: blue;"&gt;"sparseMatrix"&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;gt; DInv &amp;lt;- &lt;a href="http://inside-r.org/r-doc/Matrix/Diagonal"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;Diagonal&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;x=&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;/Dmat&lt;span style="color: #009900;"&gt;(&lt;/span&gt;ped2&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;gt; AInv &amp;lt;- &lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/base/sqrt"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;sqrt&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;DInv&lt;span style="color: #009900;"&gt;)&lt;/span&gt; %*% TInv&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## Variance ratio&lt;/span&gt;
&amp;gt; alpha &amp;lt;- sigma2e / sigma2a
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## Mixed Model Equations (MME)&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## ... Left-Hand Side (LHS) without pedigree prior&lt;/span&gt;
&amp;gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;LHS0 &amp;lt;- rBind&lt;span style="color: #009900;"&gt;(&lt;/span&gt;cBind&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;X&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;    &lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;X&lt;span style="color: #339933;"&gt;,&lt;/span&gt; Z&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
+                cBind&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;Z&lt;span style="color: #339933;"&gt;,&lt;/span&gt; X&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;Z&lt;span style="color: #339933;"&gt;,&lt;/span&gt; Z&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&lt;span style="color: #cc66cc;"&gt;12&lt;/span&gt; x &lt;span style="color: #cc66cc;"&gt;12&lt;/span&gt; sparse &lt;a href="http://inside-r.org/r-doc/Matrix/Matrix"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;Matrix&lt;/span&gt;&lt;/a&gt; of &lt;a href="http://inside-r.org/r-doc/base/class"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;class&lt;/span&gt;&lt;/a&gt; &lt;span style="color: blue;"&gt;"dgCMatrix"&lt;/span&gt;
   &lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #009900;"&gt;[&lt;/span&gt; suppressing &lt;span style="color: #cc66cc;"&gt;12&lt;/span&gt; column &lt;a href="http://inside-r.org/r-doc/base/names"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;names&lt;/span&gt;&lt;/a&gt; ‘&lt;span style="color: #009900;"&gt;(&lt;/span&gt;Intercept&lt;span style="color: #009900;"&gt;)&lt;/span&gt;’&lt;span style="color: #339933;"&gt;,&lt;/span&gt; ‘group2’&lt;span style="color: #339933;"&gt;,&lt;/span&gt; ‘individual1’ ... &lt;span style="color: #009900;"&gt;]&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #009900;"&gt;(&lt;/span&gt;Intercept&lt;span style="color: #009900;"&gt;)&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;7&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt; . &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . . . &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;
group2       &lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt; . . . &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . . . .
individual1  . . . . . . . . . . . .
individual2  &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt; . . &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt; . . . . . . . .
individual3  &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . . . &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . . . . . . .
individual4  &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . . . &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . . . . . .
individual5  &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . . . . &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . . . . .
individual6  &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . . . . . &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . . . .
individual7  . . . . . . . . . . . .
individual8  . . . . . . . . . . . .
individual9  . . . . . . . . . . . .
individual10 &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . . . . . . . . . . &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## ... Left-Hand Side (LHS) with    pedigree prior&lt;/span&gt;
&amp;gt; &lt;a href="http://inside-r.org/r-doc/base/round"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;round&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;
+  &lt;a href="http://inside-r.org/packages/cran/lhs"&gt;LHS&lt;/a&gt; &amp;lt;- rBind&lt;span style="color: #009900;"&gt;(&lt;/span&gt;cBind&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;X&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;    &lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;X&lt;span style="color: #339933;"&gt;,&lt;/span&gt; Z&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
+               cBind&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;Z&lt;span style="color: #339933;"&gt;,&lt;/span&gt; X&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;Z&lt;span style="color: #339933;"&gt;,&lt;/span&gt; Z&lt;span style="color: #009900;"&gt;)&lt;/span&gt; + AInv * alpha&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; digits=&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&lt;span style="color: #cc66cc;"&gt;12&lt;/span&gt; x &lt;span style="color: #cc66cc;"&gt;12&lt;/span&gt; sparse &lt;a href="http://inside-r.org/r-doc/Matrix/Matrix"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;Matrix&lt;/span&gt;&lt;/a&gt; of &lt;a href="http://inside-r.org/r-doc/base/class"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;class&lt;/span&gt;&lt;/a&gt; &lt;span style="color: blue;"&gt;"dgCMatrix"&lt;/span&gt;
   &lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #009900;"&gt;[&lt;/span&gt; suppressing &lt;span style="color: #cc66cc;"&gt;12&lt;/span&gt; column &lt;a href="http://inside-r.org/r-doc/base/names"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;names&lt;/span&gt;&lt;/a&gt; ‘&lt;span style="color: #009900;"&gt;(&lt;/span&gt;Intercept&lt;span style="color: #009900;"&gt;)&lt;/span&gt;’&lt;span style="color: #339933;"&gt;,&lt;/span&gt; ‘group2’&lt;span style="color: #339933;"&gt;,&lt;/span&gt; ‘individual1’ ... &lt;span style="color: #009900;"&gt;]&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #009900;"&gt;(&lt;/span&gt;Intercept&lt;span style="color: #009900;"&gt;)&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;7&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;  .    &lt;span style="color: #cc66cc;"&gt;2.0&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;1.0&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;1.0&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;1.0&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;1.0&lt;/span&gt;  .    .    .    &lt;span style="color: #cc66cc;"&gt;1.0&lt;/span&gt;
group2       &lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;  .    .    .    &lt;span style="color: #cc66cc;"&gt;1.0&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;1.0&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;1.0&lt;/span&gt;  .    .    .    .  
individual1  . .  &lt;span style="color: #cc66cc;"&gt;0.5&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;0.2&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.3&lt;/span&gt;  .    .    .    .    .    .    .  
individual2  &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt; .  &lt;span style="color: #cc66cc;"&gt;0.2&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;2.8&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.2&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.2&lt;/span&gt;  .   -&lt;span style="color: #cc66cc;"&gt;0.3&lt;/span&gt;  .    .    .    .  
individual3  &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; . -&lt;span style="color: #cc66cc;"&gt;0.3&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.2&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;2.0&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;0.2&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.3&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.3&lt;/span&gt;  .    .    .    .  
individual4  &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;  .   -&lt;span style="color: #cc66cc;"&gt;0.2&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;0.2&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;1.6&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.3&lt;/span&gt;  .    .    .    .    .  
individual5  &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;  .    .   -&lt;span style="color: #cc66cc;"&gt;0.3&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.3&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;2.1&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;  .    .  
individual6  &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;  .   -&lt;span style="color: #cc66cc;"&gt;0.3&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.3&lt;/span&gt;  .    &lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;2.1&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;  .    .  
individual7  . .  .    .    .    .   -&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;0.8&lt;/span&gt;  .    .    .  
individual8  . .  .    .    .    .   -&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;  .    &lt;span style="color: #cc66cc;"&gt;1.0&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;0.2&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;
individual9  . .  .    .    .    .    .    .    .    &lt;span style="color: #cc66cc;"&gt;0.2&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;0.5&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;
individual10 &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; .  .    .    .    .    .    .    .   -&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;1.8&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## ... Right-Hand Side (RHS)&lt;/span&gt;
&amp;gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;RHS &amp;lt;- rBind&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;X&lt;span style="color: #339933;"&gt;,&lt;/span&gt; y&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
+               &lt;a href="http://inside-r.org/r-doc/base/crossprod"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;crossprod&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;Z&lt;span style="color: #339933;"&gt;,&lt;/span&gt; y&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&lt;span style="color: #cc66cc;"&gt;12&lt;/span&gt; x &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;a href="http://inside-r.org/r-doc/Matrix/Matrix"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;Matrix&lt;/span&gt;&lt;/a&gt; of &lt;a href="http://inside-r.org/r-doc/base/class"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;class&lt;/span&gt;&lt;/a&gt; &lt;span style="color: blue;"&gt;"dgeMatrix"&lt;/span&gt;
             &lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;
&lt;span style="color: #009900;"&gt;(&lt;/span&gt;Intercept&lt;span style="color: #009900;"&gt;)&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;716&lt;/span&gt;
group2        &lt;span style="color: #cc66cc;"&gt;300&lt;/span&gt;
individual1     &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;
individual2   &lt;span style="color: #cc66cc;"&gt;209&lt;/span&gt;
individual3    &lt;span style="color: #cc66cc;"&gt;98&lt;/span&gt;
individual4   &lt;span style="color: #cc66cc;"&gt;101&lt;/span&gt;
individual5   &lt;span style="color: #cc66cc;"&gt;106&lt;/span&gt;
individual6    &lt;span style="color: #cc66cc;"&gt;93&lt;/span&gt;
individual7     &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;
individual8     &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;
individual9     &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;
individual10  &lt;span style="color: #cc66cc;"&gt;109&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;### --- Solutions ---&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## Solve&lt;/span&gt;
&amp;gt; LHSInv &amp;lt;- &lt;a href="http://inside-r.org/r-doc/base/solve"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;solve&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/packages/cran/lhs"&gt;LHS&lt;/a&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;gt; sol &amp;lt;- LHSInv %*% RHS
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## Standard errors&lt;/span&gt;
&amp;gt; se &amp;lt;- &lt;a href="http://inside-r.org/r-doc/base/diag"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;diag&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;LHSInv&lt;span style="color: #009900;"&gt;)&lt;/span&gt; * sigma2e
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## Reliabilities&lt;/span&gt;
&amp;gt; r2 &amp;lt;- &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; - &lt;a href="http://inside-r.org/r-doc/base/diag"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;diag&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;LHSInv&lt;span style="color: #009900;"&gt;)&lt;/span&gt; * alpha
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## Accuracies&lt;/span&gt;
&amp;gt; r &amp;lt;- &lt;a href="http://inside-r.org/r-doc/base/sqrt"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;sqrt&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;r2&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
Warning &lt;a href="http://inside-r.org/r-doc/base/message"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;message&lt;/span&gt;&lt;/a&gt;:
In &lt;a href="http://inside-r.org/r-doc/base/sqrt"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;sqrt&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;r2&lt;span style="color: #009900;"&gt;)&lt;/span&gt; : NaNs produced
&amp;gt; 
&amp;gt; &lt;span style="color: #666666; font-style: italic;"&gt;## Printout&lt;/span&gt;
&amp;gt; cBind&lt;span style="color: #009900;"&gt;(&lt;/span&gt;sol&lt;span style="color: #339933;"&gt;,&lt;/span&gt; se&lt;span style="color: #339933;"&gt;,&lt;/span&gt; r&lt;span style="color: #339933;"&gt;,&lt;/span&gt; r2&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&lt;span style="color: #cc66cc;"&gt;12&lt;/span&gt; x &lt;span style="color: #cc66cc;"&gt;4&lt;/span&gt; &lt;a href="http://inside-r.org/r-doc/Matrix/Matrix"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;Matrix&lt;/span&gt;&lt;/a&gt; of &lt;a href="http://inside-r.org/r-doc/base/class"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;class&lt;/span&gt;&lt;/a&gt; &lt;span style="color: blue;"&gt;"dgeMatrix"&lt;/span&gt;
                         se         r         r2
 &lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;104.76444809&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1.901479&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0.6051228&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;0.3661736&lt;/span&gt;
 &lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;  -&lt;span style="color: #cc66cc;"&gt;4.65061921&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1.376348&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0.7356748&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;0.5412175&lt;/span&gt;
 &lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;  -&lt;span style="color: #cc66cc;"&gt;2.62685846&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;2.432448&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0.4349528&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;0.1891839&lt;/span&gt;
 &lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;4&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;  -&lt;span style="color: #cc66cc;"&gt;0.77797260&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1.983301&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0.5821509&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;0.3388997&lt;/span&gt;
 &lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;5&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;  -&lt;span style="color: #cc66cc;"&gt;4.32927399&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1.979138&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0.5833415&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;0.3402874&lt;/span&gt;
 &lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;6&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;1.54997883&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;2.316720&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0.4772421&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;0.2277600&lt;/span&gt;
 &lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;7&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;3.18706240&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;2.604540&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0.3630701&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;0.1318199&lt;/span&gt;
 &lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;8&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;  -&lt;span style="color: #cc66cc;"&gt;5.07852788&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;2.508673&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0.4046922&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;0.1637758&lt;/span&gt;
 &lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;9&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;  -&lt;span style="color: #cc66cc;"&gt;0.94573274&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;3.459904&lt;/span&gt;       &lt;span style="color: black; font-weight: bold;"&gt;NaN&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.1533013&lt;/span&gt;
&lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;10&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;  -&lt;span style="color: #cc66cc;"&gt;0.08765651&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;3.534636&lt;/span&gt;       &lt;span style="color: black; font-weight: bold;"&gt;NaN&lt;/span&gt; -&lt;span style="color: #cc66cc;"&gt;0.1782121&lt;/span&gt;
&lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;11&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2.11218764&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;2.511203&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0.4036487&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;0.1629323&lt;/span&gt;
&lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;12&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;2.82742681&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;2.009539&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0.5745901&lt;/span&gt;  &lt;span style="color: #cc66cc;"&gt;0.3301538&lt;/span&gt;
&amp;gt; 
&amp;gt; &lt;a href="http://inside-r.org/r-doc/base/proc.time"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;proc.time&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
   user  &lt;a href="http://inside-r.org/r-doc/base/system"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;system&lt;/span&gt;&lt;/a&gt; elapsed 
  &lt;span style="color: #cc66cc;"&gt;3.350&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;0.070&lt;/span&gt;   &lt;span style="color: #cc66cc;"&gt;3.425&lt;/span&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;a href="http://www.inside-r.org/pretty-r" title="Created by Pretty R at inside-R.org"&gt;Created by Pretty R at inside-R.org&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/GregorGorjancsBlog/~4/oulGeCRX4rA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/GregorGorjancsBlog/~3/oulGeCRX4rA/small-pedigree-based-mixed-model.html</link><author>noreply@blogger.com (Gregor Gorjanc)</author><thr:total>0</thr:total><feedburner:origLink>http://ggorjan.blogspot.com/2012/04/small-pedigree-based-mixed-model.html</feedburner:origLink></item></channel></rss>
