Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/condense.dmmarray.R

An object of type `dmmarray`

is an array of objects of type `dmm`

, with each array element representing the reult of a `dmm()`

analysis for one pair of traits. The function `condense.dmmarray`

will recombine these results into a single object of class `dmm`

with the variance component and genetic parameter estimates matrices being for all traits, and other elements of the `dmm`

object being appropriately pooled.

1 |

`da` |
An object of class |

In bringing together the results of several `traitspairwise`

analyses into a single matrix of (for example) individual additive genetic variance/covariance components, one is putting together into one matrix elements estimated with different precisions due to differnt replication for each pair of traits. The resulting matrix may not be positive definite even if all the contributing `traitspairwise`

2 x 2 matrices are forced positive definite.

If the argument `da`

contains results from a `dmm`

run with `gls=T`

then the GLS results for each traitpair will also be condensed. In this case the GLS results must be present for every traitpair. It can be quite difficult to get `gls=T`

runs to converge successfully for every trait pair.

An object of class `dmm`

, containing the recombined results for all traits.

An object of class `dmmarray`

can be manipulated as is without using the `condense.dmmarray()`

function. For example one element of the array can be printed with

print(objectname[[i,j]])

where `i`

and `j`

are subscripts indicating the row and column position of the element to be printed. The `summary()`

and `gsummary()`

functions are also available for use in this manner. It is necessary that the `library(dmm)`

statement be made, otherwise one will get the standard `print()`

and `summary()`

functions instead of those appropriate for an object of class `dmm`

. The double square brackets are necessary because each element of the array is a list object, and you want its contents, not its name attribute.

Neville Jackson

Functions `dmm()`

, `condense.dmmblockarray()`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ```
library(dmm)
# prepare the dataset sheep.df
data(sheep.df)
# add a matrix 'Ymat' to the dataframe, which is required for traitspairwise
# keep=TRUE is required
sheep.mdf <- mdf(sheep.df,pedcols=c(1:3),factorcols=c(4:6),ycols=c(7:9),
sexcode=c("M","F"),keep=TRUE)
# make sheep.fit as a class dmmarray object
sheep.fit <- dmm(sheep.mdf, Ymat ~ 1 + Year + Sex,traitspairwise=TRUE)
# look at one element of the dmmarray
summary(sheep.fit[["Cww","Diam"]])
# condense the dmmarray to a class dmm object
sheep.condense <- condense.dmmarray(sheep.fit)
# compute a response to selection
sheep.resp <- gresponse(sheep.condense,psd=list(dp=c(1,1,1)),effects=c("G(Ia)"))
# look at response object
summary(sheep.resp)
#cleanup
rm(sheep.df)
rm(sheep.mdf)
rm(sheep.fit)
rm(sheep.condense)
rm(sheep.resp)
``` |

dmm documentation built on June 16, 2018, 1:38 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.