singleHI: Time Inference of HI model for a Single LD Decay Curve

Description Usage Arguments Details Value See Also Examples

View source: R/CAMer.R

Description

Find the estimated time point for HI model and corresponding statictis (ssE, msE, etc.) for a single LD decay curve (e.g. Combined_LD or Jack? in a .rawld file).

Usage

1
singleHI(d, Z, m1, T = 500L)

Arguments

d

the numeric vector of genetic distance (Morgan) of LD decay curve

Z

the numeric vector of LD decay curve

m1

the admixture proportion of population 1. If m2 is the admixing proportion of population 2, then m1+m2=1.

T

the most ancient generation to be searched. Defaults to 500.

Details

This function is similar to singleCAM, except that it only considers HI model as the core model.

Value

an object of S3 class "CAM.single". A list consisting of:

call

the matched call

maxindex

the index of the maximal value in Z See "Details".

d,Z

identical to function inputs up to some truncation. See "Details"

T,isolation

identical to function inputs

A

numeric matrix A with the (i,j)-th entry being \text{exp}(-j \cdot d_i), d_i meaning the i-th entry of d and j meaning the genertion.

m1,m2

admixture proportion of population 1 and 2

estimate

a list of estimates. Each element contains the estimated parameters m, n, θ_0, θ_1, starting generation, ending generation and the corresponding ssE and msE. The time point for HI model is stored in start variable.

summary

a data frame containing the information in estimate in a compact form

See Also

singleCAM, HI, reconstruct.fitted

Examples

1
2
3
4
5
data(CGF_50)
d<-CGF_50$Distance
Z<-CGF_50$Combined_LD
fitHI<-singleHI(d,Z,m1=.3,T=70L)
fitHI

QIU-Hongxiang-David/CAMer documentation built on Nov. 13, 2021, 5:15 p.m.