*********Documentation for using "hybrid.r"*************

 

The package "hybrid.r" provides simultaneous estimation of environmental risk

factors,  candidate genes, and their interactions using data on cases,

unrelated controls, and case parents.  The program outputs the

log-odds ratio estimate, standard error estimate, and p-value for each

covariate using data on case families only, case-unrelated controls

only, and combined case families and unrelated controls. 

 

 

## upload the function

 

In R, type

      source("hybrid_version_1.1.r")

 

## Data preparation

 

Data for case families should be arranged as follows:

 

famid(required): unique family identification

member(required): 1 for being case, 2 for father, and 3 for mother

env1: first environmental risk factor.  There is no need to have this

      column if no environmental risk factor is considered.

env2: 2nd environmental risk factor

...

gene1(required): first candidate gene.  It is coded as 0, 1, or 2 for the number

       of variant alleles.

gene2: second candidate gene.

...

 

Data for unrelated subjects should be arranged as follows:

 

famid(required): unique family identification

member(required): 1 for being a case, 0 for being a control.

env1: first environmental risk factor.  There is no need to have this

      column if no environmental risk factor is considered.

env2: 2nd environmental risk factor

...

gene1(required): first candidate gene.  It is coded as 0, 1, or 2 for the number

       of variant alleles.

gene2: second candidate gene.

...

 

### Remarks about missing data

 

In the presence of missing data for unrelated subjects, the program

excludes individuals with missing values in any of the covariates.

For case families, the program will use the multiple imputation method

to impute the missing genotype of the parents for dyads only.   Note

that the program treated the dataset as if all covariates in the

dataset would be used in the model even though only a subset of

covariates may be specified in the model specification.   This will

result excluding more individuals than  necessary when running a

submodel.  To avoid this situation, prepare your dataset such that it

includes only the covariates that you would want to fit in the model. 

        

## Model fitting

 

Usage:

 

  hybrid(case.fam,cc.ctrl=NULL,n.env=0,model=NULL,interaction=NULL,nimp=1)

 

Value:

 

  case.fam(required): cases and their parents (parents may be missing).

  cc.ctrl: unrelated cases and controls

  n.env: number of environmental risk factors

  model: model selection for the candidate genes.  It is a vector with

         the same length as the number of candidate genes. The element

         takes a value of 1 for additive model, 2 for dominant model, or

         3 for recessive model.  The default is additive models for all

         candidate genes.

  interaction: a vector of interaction effects (i1,i2,i3,i4,...),

         indicating the model includes the interaction effects

         between i1th column and i2th column, and between i3th column

         and i4th column, etc.  The default=NULL has no interaction

         effects. 

  nimp:  number of imputations when there are incomplete triads.  The

         default is 1 for complete triads analysis. 

 

 

## Example

 

> case.fam[1:10,]

    family member IGFBP3 IGF1

    100036      1      0    1

    100036      2      1    0

    100036      3      0    2

    100049      1      1    0

    100049      2      2    1

    100065      1      1    2

    100065      2      2    2

    100078      1      1    0

    100078      2      0    0

    100078      3      2    0

 

> cc.ctrl[1:10,]

   family member IGFBP3 IGF1

     20001      0      1    0

     20003      0      1    1

     20004      0      2    1

     20005      0      0    0

     20006      0      2    1

     20011      0      0    1

     20016      0      1    1

     20019      0      1    0

     20020      0      2    0

     20021      0      0    0

 

 

> hybrid(case.fam=case.fam,cc.ctrl=cc.ctrl,model=c(1,1),interaction=c(3,4),nimp=5)

## Additive models for a genexgene interactions.   A total of 5

## imputed data sets were generated.

 

## Output

 

              Case-Fam            Case-Ctrl           Case-Fam-Ctrl

 

IGFBP3        0.701(0.285,0.01)   0.156(0.156,0.31)   0.272(0.142,0.05)

 

IGF1          0.193(0.399,0.62)   0.261(0.198,0.18)   0.268(0.171,0.11)

 

IGFBP3*IGF1   -0.32(0.286,0.25)   -0.27(0.157,0.08)   -0.30(0.147,0.04)

 

Each entry is log-odds ratio (s.e., p-value).