power                 package:pbatR                 R Documentation

_P_o_w_e_r _E_x_p_l_o_r_a_t_i_o_n

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

     Power has been completely rewritten from scratch, and is all done
     via monte carlo simulation internally now.  These routines do not
     require pbat, and should run on any machine.

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

     pbat.power( mode="continuous" )

     pbat.powerCmd( numOffspring=1, numParents=2, numFamilies=500,
                    additionalOffspringPhenos=TRUE,
                    ascertainment="affected",
                    model="additive",
                    afreqMarker=NA,
                    penAA=0.8, penAB=0.5, penBB=0.3,
                    heritability=0.0, contsAscertainmentLower=0.0,
                     contsAscertainmentUpper=1.0,
                    pDiseaseAlleleGivenMarkerAllele=1.0, afreqDSL=0.1,
                    alpha=0.01,
                    offset="default",
                    numSim=1000 )

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

    mode: "continuous" or "dichotomous"

numOffspring: Family - number of offspring

numParents: Family - number of parents (0,1,2)

numFamilies: Family - number of families

additionalOffspringPhenos: Only used when you have missing parents;
          additional offspring phenotypes. 1 for yes, 0 for no.

ascertainment: 'unaffected', 'affected', or 'na' for anyone

   model: 'additive', 'dominant', 'recessive' or (only for binary /
          case control) 'multi'

afreqMarker: allele frequency at the marker

   penAA: penetrance of AA genotype

   penAB: penetrance of AB genotype

   penBB: penetrance of BB genotype

heritability: heritibility - when this is zero, a binary trait
          according to the previously defined parameters is used; when
          it is nonzero, a continuous trait is used.

contsAscertainmentLower: Lower bound for affected ascertainment with a
          continuous trait, this is a vector for each member after the
          proband, defaulting to `0'. It represents the quantiles, so
          0.05 would indicate that the lower 5 percent of the
          phenotypes should be removed.

contsAscertainmentUpper: Upper bound, defaults to `1'.

pDiseaseAlleleGivenMarkerAllele: 

afreqDSL: allele frequency at DSL, defaults to marker frequency.

   alpha: significance level

  offset: "default" uses the population prevalence for dichotomous
          traits and the population mean for continuous traits. If a
          number is specified, then that number is used as the offset.

  numSim: Number of monte-carlo simulations. I'd use a smaller number
          while starting out with it, and then turn it up to a much
          higher number of iterations later on.

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

     pbat.powerCmd(...) does not really do any range checking,
     primarily because I don't expect most will use it directly, and
     instead will use the friendly GUI interface for power exploration.

     Be careful with the number of simulations! When you are first
     exploring, you can keep this low, but you should turn this all the
     way up before doing your final computation.

     Note that some values of `pDiseaseAlleleGivenMarkerAllele' in
     combination with `afreqMarker' are not possible. These will return
     negative values (these are error codes for the GUI, which will
     provide more helpful messages).

     Lastly, you might want to look into something like set.seed(1)
     e.g., if you want the results to be reproducable (set it to any
     number, but make note of this number, see set.seed for more
     details).

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

     <URL: http://www.biostat.harvard.edu/~clange/default.htm>

     <URL: http://www.people.fas.harvard.edu/~tjhoffm/pbatR.html>

     Hoffmann, T. and Lange, C. (2006) P2BAT: a massive parallel
     implementation of PBAT for genome-wide association studies in R.
     Bioinformatics. Dec 15;22(24):3103-5.

     Horvath, Steve, Xu, Xin, and Laird, Nan M. The family based
     association test method: computing means and variances for general
     statistics. Tech Report.

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

     'pbat', 'pbat.last'

