haplo.score.w {GeneticsBase} | R Documentation

## Wrapper for computing score statistics to evaluate the association of a trait with haplotypes, when linkage phase is unknown and diploid marker phenotypes are observed among unrelated subjects

### Description

wrapper for computing score statistics to evaluate the association of a trait with haplotypes, when linkage phase is unknown and diploid marker phenotypes are observed among unrelated subjects. For now, only autosomal loci are considered.

### Usage

    haplo.score.w(geneSetObj,
                  trait.type = "gaussian",
                  offset = NA,
                  x.adj = NA,
                  skip.haplo = 5/(2 * nrow(geno)),
                  locus.label = NA,
                  miss.val = c(0, NA),
                  simulate = FALSE,
                  sim.control = score.sim.control(),
                  em.control = haplo.em.control())

### Arguments

`geneSetObj` | A geneSet object
`trait.type` | Character string defining type of trait, with values of “gaussian”, “binomial”, “poisson”, “ordinal”.
`offset` | Vector of offset when trait.type = “poisson”
`x.adj` | Matrix of non-genetic covariates used to adjust the score statistics. Note that intercept should not be included, as it will be added in this function.
`skip.haplo` | Skip score statistics for haplotypes with frequencies < `skip.haplo`. The default is for an expected count of 5 out of the 2*N haplotype occurrences.
`locus.label` | Vector of labels for loci.
`miss.val` | vector of values that represent missing alleles in geno.
`simulate` | Logical: if [F]alse, no empirical p-values are computed; if [T]rue, simulations are performed. Specific simulation parameters can be controlled in the sim.control parameter list.
`sim.control` | List of control parameters to determine how simulations are performed for simulated p-values. The list is created by the function `score.sim.control` and the default values of this function can be changed as desired. See `score.sim.control` for details.
`em.control` | A list of control parameters to determine how to perform the EM algorithm for estimating haplotype frequencies when phase is unknown. The list is created by the function `haplo.em.control` - see this function for more details

### Details

Please refer to `haplo.score` for more details.

### Value

List with the following components:

`score.global` | Global statistic to test association of trait with haplotypes that have frequencies >= skip.haplo.
`df` | Degrees of freedom for score.global.
`score.global.p` | P-value of score.global based on chi-square distribution, with degrees of freedom equal to df.
`score.global.p.sim` | P-value of score.global based on simulations (set equal to NA when simulate=F).
`score.haplo` | Vector of score statistics for individual haplotypes that have frequencies >= skip.haplo.
`score.haplo.p` | Vector of p-values for score.haplo, based on a chi-square distribution with 1 df.
`score.haplo.p.sim` | Vector of p-values for score.haplo, based on simulations (set equal to NA when simulate=F).
`score.max.p.sim` | Simulated p-value indicating for simulations the number of times a maximum score.haplo value exceeds the maximum score.haplo from the original data (equal to NA when simulate=F).
`haplotype` | Matrix of hapoltypes analyzed. The ith row of haplotype corresponds to the ith item of score.haplo, score.haplo.p, and score.haplo.p.sim.
`hap.prob` | Vector of haplotype probabilies, corresponding to the haplotypes in the matrix haplotype.
`locus.label` | Vector of labels for loci, of length K (same as input argument).
`simulate` | Same as function input parameter. If [T]rue, simulation results are included in the haplo.score object.
`n.val.global` | Vector containing the number of valid simulations used in the global score statistic simulation. The number of valid simulations can be less than the number of simulations requested (by sim.control) if simulated data sets produce unstable variances of the score statistics.
`n.val.haplo` | Vector containing the number of valid simulations used in the p-value simulations for maximum-score statistic and scores for the individual haplotypes.

### Note

~~further notes~~

### Author(s)

### References

~put references to the literature/web site here ~

### See Also

`haplo.em.w`, `haplo.scan.w`, `haplo.score.slide.w`

### Examples

    ##---- Should be DIRECTLY executable !! ----
    ##-- ==>  Define data, use random,
    ##--    or do  help(data=index)  for the standard data sets.

    ## The function is currently defined as
    "haplo.score.w"

[Package GeneticsBase version 1.0.0 Index]