my.haplotypes: e-flat and m-flat parameterizations for 0,1^d

Description Usage Examples

Description

e-flat and m-flat

Usage

1

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
library(MCMCpack)
d <- 3
n <- 2^d
freq <- c(rdirichlet(1,rep(1,n)))
freq
thetapsi <- my.freq2thetapsi(freq)
psi <- thetapsi[1]
theta <- thetapsi[-1]
thetapsi
eta <- my.freq2eta(freq)
eta
my.eta2freq(eta)
my.eta2thetapsi(eta)
my.theta2freq(theta)
my.theta2eta(theta)

freq <- rep(1/8,8)
freq
thetapsi <- my.freq2thetapsi(freq)
psi <- thetapsi[1]
theta <- thetapsi[-1]
thetapsi
eta <- my.freq2eta(freq)
eta
my.eta2freq(eta)
my.eta2thetapsi(eta)
my.theta2freq(theta)
my.theta2eta(theta)

dd <- 0
freq <- c(1/2-dd*3,dd,dd,dd,dd,dd,dd,1/2-dd*3)
freq
thetapsi <- my.freq2thetapsi(freq)
psi <- thetapsi[1]
theta <- thetapsi[-1]
thetapsi
eta <- my.freq2eta(freq)
eta
my.eta2freq(eta)
my.eta2thetapsi(eta)
my.theta2freq(theta)
my.theta2eta(theta)

ryamada22/Ronlyryamada documentation built on May 28, 2019, 10:43 a.m.