trio.permTest {trio} | R Documentation

## Permutation Tests for Trio Logic Regression

### Description

Performs either a null-model or a conditional permutation test for a trio logic regression analysis.

### Usage

    trio.permTest(object, conditional = FALSE, n.perm = 10, nleaves = NULL,
       control = NULL, rand = NA)

### Arguments

`object` | an object of class `trioLR`, i.e. the output of the function `trioLR`. This object must be the result of a trio logic regression analysis in which a single model has been fitted (i.e. in `trioLR`, `search` must have been set to `"sa"` and `nleaves` must have been a single integer).
`conditional` | should the conditional permutation test be performed? If `FALSE`, a null-model permutation test is done analogously to the null-model permutation test for a standard logic regression for population-based data implemented in the function `logreg` of the `R` package `LogicReg`. If `TRUE`, a test analogous to the conditional permutation test for a standard logic regression is performed.
`n.perm` | integer specifying the number of permutations.
`nleaves` | integer specifying the maximum number of leaves that the logic tree in the trio logic regression model is allowed to have. If `NULL`, the maximum number of leaves saved in `object` is used.
`control` | a list containing the control parameters for the search algorithms and the logic tree considered in `trioLR`, where the parameters for an MCMC run and the logic tree are ignored. If `NULL` (i.e. by default), the same values for the parameters are used that have been employed in the original analysis with `trioLR`. If other values should be used, it is highly recommended to specify `control` by employing `lrControl`.
`rand` | an integer. If specified, the random number generator will be set into a reproducible state.

### Value

A list consisting of

`origScore` | `NA`, if `conditional = FALSE`, and otherwise, the score, i.e.\ the value of the partial likelihood, of the original model saved in `object`

,

`permScore` | a vector of length `n.perm` containing the scores for the trio logic regression models built in the iterations of the permutation test.

### Author(s)

Qing Li, mail2qing@yahoo.com. Modified by Holger Schwender.

### References

Li, Q., Fallin, M.D., Louis, T.A., Lasseter, V.K., McGrath, J.A., Avramopoulos, D., Wolyniec, P.S., Valle, D., Liang, K.Y., Pulver, A.E., and Ruczinski, I. (2010). Detection of SNP-SNP Interactions in Trios of Parents with Schizophrenic Children. Genetic Epidemiology, 34, 396-406.

### See Also

`trioLR`

### Examples

    # Load the simulated data.
    data(trio.data)

    # Prepare the data in trio.ped1 for a trio logic
    # regression analysis by first calling
    trio.tmp <- trio.check(dat = trio.ped1)

    # and then applying
    set.seed(123456)
    trio.bin <- trio.prepare(trio.dat=trio.tmp, blocks=c(1,4,2,3))

    # where we here assume the block structure to be
    # c(1, 4, 2, 3), which means that the first LD "block"
    # only consists of the first SNP, the second LD block
    # consists of the following four SNPs in trio.bin,
    # the third block of the following two SNPs,
    # and the last block of the last three SNPs.
    # set.seed() is specified to make the results reproducible.

    # For the application of trio logic regression, some
    # parameters of trio logic regression are changed
    # to make the following example faster.
    my.control <- lrControl(start=1, end=-3, iter=1000, output=-4)

    # Please note typically you should consider much more
    # than 1000 iterations (usually, at least a few hundred
    # thousand).

    # Trio regression can then be applied to the trio data in
    # trio.ped1 by
    lr.out <- trioLR(trio.bin, control=my.control, rand=9876543)

    # where we specify rand just to make the results reproducible.

    # A null model permutation test can be performed by
    trio.permTest(lr.out)

    # The conditional permutation test can be performed by
    trio.permTest(lr.out, conditional = TRUE)

[Package trio version 3.22.0 Index]