Learn R Programming

ASPBay (version 1.2)

ASP.Bayesian: Samples in the posterior distribution of the frequencies and OR

Description

Samples using Metropolis-Hasting Algorithm in the posterior distribution of the four haplotype frequencies and OR

Usage

ASP.Bayesian(N, Tem_Gen, Index_Gen, IBD, snp, thin = 1, sd.freq = 0.05,
                     sd.psi = 0.05, p0 = c(rep(1/4, 4), 1), psi.prior = 0)

Arguments

N
Number of Metropolis-Hastings iterations
Tem_Gen
Genotypes of controls (denoted by the number of alternative allele)
Index_Gen
Genotypes of index cases
IBD
IBD states for each affected sib-pair
snp
Names or number column of the SNP to consider
thin
Thinning parameter (keep only every thin-th draw)
sd.freq
Random walk standard deviation of the frequency logarithms
sd.psi
Random walk standard deviation of the OR
p0
The initial point of random walk
psi.prior
Precision of gaussian log(OR) prior (0 = improper flat prior)

Value

  • List of 5 vectors of length N/thin with components:
  • f_abSample of the haplotype composed by the two alternative alleles
  • f_AbSample of the haplotype composed by the reference allele for the causal (unobserved) locus and the alternative alleles for the observed locus
  • f_aBSample of the haplotype composed by the alternative allele for the causal (unobserved) locus and the reference alleles for the observed locus
  • f_ABSample of the haplotype composed by the two reference alleles
  • ORSample of the OR

Details

Samples using Metropolis-Hasting and likelihood defined by data. More precisely, give the frequency samples of haplotypes for observed SNP and unobserved causal SNP and give the sample of the odds ratio associated to the causal SNP.

References

Dandine-Roulland, Claire and Perdry, Herve. Where is the causal variant? On the advantage of the family design over the case-control design in genetic association studies. Submitted to Eur J Hum Genet

See Also

ASP.Selection, Graphs.Bayesian

Examples

Run this code
data(ASPData)
B <- ASP.Bayesian(1e5, ASPData$Control, ASPData$Index,
                  ASPData$IBD, 15 )

Run the code above in your browser using DataLab