compare_fits4: Compare the fit of two qpgraph models

Description Usage Arguments Examples

Description

Takes two data frames with model fits computed on two graphs for on the same populations and tests whether the scores of one graph are significantly better than the scores of the other.

Usage

1
compare_fits4(fit1, fit2, f2_blocks, f2_blocks_test, boot = FALSE, seed = NULL)

Arguments

fit1

The fit of the first graph

fit2

The fit of the second graph

f2_blocks

f2 blocks used for fitting fit1 and fit2. Used in combination with f2_blocks_test to compute f-statistics covariance matrix.

f2_blocks_test

f2 blocks which were not used for fitting fit1 and fit2

boot

If TRUE, bootstrap resampling will be used on f2_blocks_test with the number of resamplings equal to the number of blocks. If FALSE jackknife will be used. If set to a number, bootstrap resampling will be used on f2_blocks_test with the number of resamplings equal to boot. If bootstrap resampling is enabled, empirical p-values (p_emp) and 95 confidence intervals (ci_low and ci_high) will be reported.

seed

Random seed used if boot is TRUE. Does not need to match a seed used in fitting the models

Examples

1
2
3
4
5
6
7
8
## Not run: 
nblocks = dim(example_f2_blocks)[3]
train = sample(1:nblocks, round(nblocks/2))
fit1 = qpgraph(example_f2_blocks[,,train], graph1)
fit2 = qpgraph(example_f2_blocks[,,train], graph2)
compare_fits4(fit1, fit2, example_f2_blocks[,,train], example_f2_blocks[,,-train])

## End(Not run)

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