Description Usage Arguments Value

View source: R/mPhenSimulate.R

This function can be use to sample covariance matrices. This is useful when simulating data to test Multiphenotype based association strategies. This function lets the user decide on the orthoganality within 'blocks' and between 'blocks' of correlated variables/

1 2 3 | ```
mPhen.sampleCovar(noPhenos,blockSize, orthogAll = c(0.9,0.5),
dirichletScale = 50, resample = FALSE,
sd = rgamma(noPhenos,shape=10,rate = 10))
``` |

`noPhenos` |
The number of phenotypes to simulate |

`blockSize` |
The number of phenotypes per covariance block |

`orthogAll` |
The orthogonality relationships between and within blocks expressed as a number on the interval (0,1). A number closer to one indicates closer to orthogonality, whereas 0 indicates non-orthogonality. First number is orthogonality between blocks, second is orthogonality within blocks. |

`dirichletScale` |
When sampling off diagonal elements of the cholesky decomposition, how much deviation from uniform to allow. Should be a number in interval (0,+Inf). Smaller value leads to greater variation |

`resample` |
Whether to randomly shuffle phenotype columns after sampling. |

`sd` |
Standard deviation for each phenotype |

Simulated covariance matrix

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.