fitqtl                  package:qtl                  R Documentation

_F_i_t _a _m_u_l_t_i_p_l_e _Q_T_L _m_o_d_e_l

_D_e_s_c_r_i_p_t_i_o_n:

     Fits a user-specified multiple QTL model.  If specified,  a
     drop-one-term analysis will be performed.

_U_s_a_g_e:

     fitqtl(pheno, qtl, covar=NULL, formula, method=c("imp"),
            dropone=TRUE)

_A_r_g_u_m_e_n_t_s:

   pheno: Phenotype data (a numeric vector).

     qtl: An object of class 'qtl', as output from 'makeqtl').

   covar: A data.frame of covariates

 formula: An object of class 'formula' indicating the model to be
          fitted.  QTLs are referred to as 'Q1', 'Q2', etc.  Covariates
          are referred to by their names in the data frame 'covar'.

  method: Indicates whether to use the EM algorithm or   imputation.
          (Only imputation is implemented at this point.)

 dropone: If TRUE, do drop-one-term analysis.

_D_e_t_a_i_l_s:

     In the drop-one-term analysis, for a given QTL/covariate model,
     all submodels will be analyzed.  For each term in the input
     formula, when it is dropped, all higher order terms that contain
     it will also be dropped.  The comparison between the new model and
     the full (input) model will be output.

_V_a_l_u_e:

     An object of class 'fitqtl'. It may contains two fields:

        1.  result.full is the ANOVA table as a matrix for the full
           model result. It contains the degree of freedom (df), Sum of
           squares (SS), mean square (MS), LOD score (LOD), percentage
           of variance explained (%var) and P value (Pvalue).

        2.  result.drop is a drop-one-term ANOVA table as a matrix. It
           contains degrees of freedom (df), Type III sum of squares
           (Type III SS), LOD score(LOD), percentage of variance
           explained (%var), F statistics (F value),  and P values for
           chi square (Pvalue(chi2)) and F distribution (Pvalue(F)).

           Note that the degree of freedom, Type III sum of squares,
           the LOD score and the percentage of variance explained are
           the values comparing the full to the sub-model with the term
           dropped. Also note that for imputation method, the
           percentage of variance explained, the the F values and the P
           values are approximations calculated from the LOD score.

_A_u_t_h_o_r(_s):

     Hao Wu, hao@jax.org

_R_e_f_e_r_e_n_c_e_s:

     Sen, S. and Churchill, G. A. (2001) A statistical framework for
     quantitative trait mapping.  _Genetics_ *159*, 371-387.

_S_e_e _A_l_s_o:

     'summary.fitqtl', 'makeqtl', 'scanqtl'

_E_x_a_m_p_l_e_s:

     data(fake.f2)

     # take out several QTLs and make QTL object
     qc <- c(1, 8, 13)
     qp <- c(26, 56, 28)
     fake.f2 <- subset(fake.f2, chr=qc)

     fake.f2 <- sim.geno(fake.f2, n.draws=8, step=2, err=0.001)
     qtl <- makeqtl(fake.f2, qc, qp)

     # fit model with 3 interacting QTLs interacting
     # (performing a drop-one-term analysis)
     lod <- fitqtl(fake.f2$pheno[,1], qtl, formula=y~Q1*Q2*Q3)
     summary(lod)

     ## Not run: 
     # fit an additive QTL model
     lod.add <- fitqtl(fake.f2$pheno[,1], qtl, formula=y~Q1+Q2+Q3)
     summary(lod.add)

     # fit the model including sex as an interacting covariate
     Sex <- data.frame(Sex=fake.f2$pheno$sex)
     lod.sex <- fitqtl(fake.f2$pheno[,1], qtl, formula=y~Q1*Q2*Q3*Sex, cov=Sex)
     summary(lod.sex)

     # fit the same with an additive model
     lod.sex.add <- fitqtl(fake.f2$pheno[,1], qtl, formula=y~Q1+Q2+Q3+Sex, cov=Sex)
     summary(lod.sex.add)
     ## End(Not run)

