compare_fits3: Compare the fit of two qpgraph models

Description Usage Arguments See Also Examples

Description

Takes the bootstrap score distribution of two fits on the same populations and tests whether the scores of one graph are significantly better than the scores of the other.

Usage

1
compare_fits3(scores1, scores2)

Arguments

scores1

Scores for the first graph

scores2

Scores for the second graph

See Also

qpgraph_resample_snps2 boo_list

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
boo = boo_list(f2_blocks, nboot = 100)
fits1 = qpgraph_resample_snps2(boo$boo, graph1, boo$test)
fits2 = qpgraph_resample_snps2(boo$boo, graph2, boo$test)
compare_fits3(fits1$score_test, fits2$score_test)

## End(Not run)
# Use all SNP blocks for f3 covariance matrix
## Not run: 
boo = boo_list(f2_blocks, nboot = 100)
ppinv1 = qpgraph_precompute_f3(f2_blocks, get_leafnames(graph1))$ppinv
ppinv2 = qpgraph_precompute_f3(f2_blocks, get_leafnames(graph2))$ppinv
fits1 = qpgraph_resample_snps2(boo$boo, graph1, boo$test, ppinv = ppinv1)
fits2 = qpgraph_resample_snps2(boo$boo, graph2, boo$test, ppinv = ppinv2)
compare_fits3(fits1$score_test, fits2$score_test)

## End(Not run)
# Same as above
## Not run: 
fits = qpgraph_resample_multi(f2_blocks, list(graph1, graph2), nboot = 100)
compare_fits3(fits[[1]]$score_test, fits[[2]]$score_test)

## End(Not run)

uqrmaie1/admixtools documentation built on Sept. 16, 2020, 5:55 a.m.