Sources

"ABC_PCM.c": A program code used in an analysis of weevil rostrum length in Chapter 17. Programs were written in C and should be run in a Unix (Linux) machine. All data can be input in the .c file. Each branch is labeled with consecutive numbers, which corresponded with its descendent node (shown in a parenthesis on the phylogeny below).

plot of image001

Codes

Since we are interested in estimating trait values of internal nodes at the end of branch 0 and 1, we output a value of MRCA (theta), P[0], and P[1] (corresponding to species A, B, and C in Fig 17.2).

Compile the C code as

>> gcc ABC_PCM.c

Run the program

>> ./a.out

The following output file will be created (in /Users in the case of Mac):

theta

k

mu

P[0]

P[1]

loglik

bar

4.54

3.5

5.73

4.6

4.76

-10.93

0.01

5.17

6.44

6.05

4.35

2.65

-6.06

0.73

4.56

9.84

2.79

4.81

4.38

-7.12

0.14

3.78

2.06

15.86

5.76

4.06

-7.58

0.01

4.47

6.76

2.96

3.76

3.03

-10.89

0

5.24

3.49

7.73

4.94

4.89

-7.55

0.12

4.9

3.57

7.43

4.02

4.13

-7.39

0.08

3.85

1.93

18.23

3.58

3.53

-6.26

0.72

5.57

2.57

9.73

3.89

3.39

-6.51

0.32

4.8

10.71

3.19

3.57

4.01

-11.92

0

4.28

3.88

5.78

3.19

3.4

-9.06

0.02

5.33

6.97

3.76

3.39

3.29

-10.06

0.01

5.93

2.84

9.25

5.03

5.05

-10.71

0.01

5.5

3.2

8.74

4.36

2.94

-5.04

0.77

3.9

9.38

1.87

4

3.53

-7.55

0.07

4.32

6.93

4.21

3.36

3

-7.86

0.1

5.25

4.64

5.66

4.22

3.58

-7.24

0.27

5.38

2.96

9.86

5.1

2.97

-7.51

0

4.56

3.6

7.35

4.48

3.37

-7.81

0.12

3.52

3.4

7.68

2.58

3.36

-10.49

0.01

6.4

2.03

10.3

5.37

5.33

-7.2

0.03

4.86

15.97

2.06

4.34

3.17

-13.92

0

5.01

4.3

4.45

5.16

4.29

-7.27

0.06

4.34

3.57

9.6

4.52

4.42

-9.95

0.01

5.19

13.08

1.73

4.28

4.25

-7.76

0.13

6.04

11.36

3.76

4.03

3.17

-7.03

0.23

5.2

2.54

5.77

3.53

3.22

-6.47

0.34

3.87

5.96

4.61

3.46

2.59

-7.31

0.19

5.87

6.13

3.79

4.27

3.55

-4.77

0.51

5.97

4.51

7.79

3.8

3.91

-10.87

0

4.62

3.17

13.55

3.75

2.68

-6.72

0.2

6.52

2.04

14.34

3.94

3.33

-8.14

0.1

6.15

1.85

21.83

6.95

4.54

-6.99

0.19

4.05

2.03

17.96

4.55

3.46

-6.55

0.09

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

References