Learn R Programming

OriGen (version 1.4.3)

CalcFractionsMultiLoglik: Calculates the loglikelihood for placing a sample 100 percent back into its own sample site

Description

This function takes the UnknownDataArray which contains allelelic information for individuals WITHIN a single sample site and calculates the resulting fraction loglikelihood for placing all individuals 100 percent back into their site

Usage

CalcFractionsMultiLoglik(UnknownDataArray,LambdaParameter=100)

Arguments

UnknownDataArray
An array showing the unknown individuals genetic data. It lists the two allele numbers of the unknown data. The dimension of this array is [NumberUnknowns,2,NumberLoci].
LambdaParameter
This is a real precision parameter weighting the admixture fractions algorithm. For the most part, this does not need to be changed as it seems to only affect the time to convergence. Default is 100.

Value

An array giving the penalized loglikelihood resulting from placing each unknown individual 100 percent back into his own sample site. The length of this array is [NumberUnknowns].

References

Ranola J, Novembre J, Lange K (2014) Fast Spatial Ancestry via Flexible Allele Frequency Surfaces. Bioinformatics, in press.

See Also

FitMultinomialAdmixedModelFindUnknowns for getting loglikelihoods of unknown individuals placed into chosen regions.

Examples

Run this code

#Data generation
NumberUnknowns = 50
NumberLoci = 10
TestUnknownDataArray=array(sample(1:5,2*NumberUnknowns*NumberLoci,replace=TRUE)
	,dim=c(NumberUnknowns,2,NumberLoci))

CalcFractionsMultiLoglik(TestUnknownDataArray)



Run the code above in your browser using DataLab