R: Haplotype interaction with a covariate

haplo.interaction {SNPassoc} | R Documentation

## Haplotype interaction with a covariate

### Description

This function computes the ORs (or mean differences if a quantitative trait is analyzed) and their 95% confidence intervals corresponding to an interaction between the haplotypes and a categorical covariate

### Usage

    haplo.interaction(formula, data, SNPs.sel, quantitative =
      is.quantitative(formula, data), haplo.freq.min = 0.05, ...)

### Arguments

`formula` | a symbolic description of the model to be fitted (a formula object). It might have either a continuous variable (quantitative traits) or a factor variable (case-control studies) as the response on the left of the `~` operator and a term corresponding to the interaction variable on the right indicated using 'interaction' function (e.g. `~`int(var), where var is a factor variable) and it is required. Terms with additional covariates on the the right of the ~ operator may be added to fit an adjusted model (e.g., `~`var1+var2+...+varN+int(var)).
`data` | an object of class 'setupSNP' containing the variables in the model and the SNPs that will be used to estimate the haplotypes.
`SNPs.sel` | a vector indicating the names of SNPs that are used to estimate the haplotypes
`quantitative` | logical value indicating whether the phenotype (which is on the left of the operator `~` in 'formula' argument) is quantitative. The function 'is.quantitative' returns FALSE when the phenotype is a variable with two categories (i.e. indicating case-control status). Thus, it is not a required argument but it may be modified by the user.
`haplo.freq.min` | control parameter for haplo.glm included in 'haplo.glm.control'. This parameter corresponds to the minimum haplotype frequency for a haplotype to be included in the regression model as its own effect. The haplotype frequency is based on the EM algorithm that estimates haplotype frequencies independently of any trait.
`...` | additional parameters for 'haplo.glm.control'.

### Details

The function estimates the haplotypes for the SNPs indicated in the 'SNPs.sel' argument. Then, usign 'haplo.glm' function (from 'haplo.stats' library) estimates the interaction between these haplotypes and the covariate indicated in the formula by means of 'interaction' function.

### Value

Three different tables are given. The first one corresponds to the full interaction matrix where the ORs (or mean differences if a quantitative trait is analyzed) are expressed with respect to the most frequent haplotype and the first category of the covariate. The other two tables show the ORs (or mean differences if a quantitative trait is analyzed) and their 95% confidence intervals for both marginal models. P values for interaction are also showed in the output.

### Examples

    # not Run
    # data(SNPs)
    # datSNP<-setupSNP(SNPs,6:40,sep="")
    # res<-haplo.interaction(log(protein)~int(sex), data=datSNP,
    #      SNPs.sel=c("snp100019","snp10001","snp100029"))
    # res

[Package SNPassoc version 1.9-2 Index]