flogliksingle: A function to calculate loglikelihood of a single locus...

Description Usage Arguments Value Author(s) Examples

View source: R/flogliksingle.R

Description

A function to calculate loglikelihood of a single locus model.

Usage

1
flogliksingle(parr, freqMatrix, rate, pos)

Arguments

parr

Parameter vector.

freqmatrix

Longitudinal frequency matrix of 4 nucleotides (A, C, G, T).

Pos

The position of A, C, G, T under selection.

Value

loglikelihood of a single locus model.

Author(s)

Fei Xiang ([email protected])

Examples

1
2
3
4
5
freq=cbind(D2=c(0,0,57,0),D3=c(0,0,44,0),D4=c(3,0,45,0))
rownames(freq)=c("a","c","g","t")
flogliksingle(c(0,1,1,1,1,1),freq,1/3*10^(-5),1)
library(minqa)
bobyqa(c(.1,.1,.1,.1,.1,.1),flogliksingle,upper=Inf,lower=0,freqMatrix=freq,rate=1/3*10^(-5),pos=1)

sdwfrost/popseq documentation built on May 29, 2019, 4:23 p.m.