Learn R Programming

DOBAD (version 1.0.6)

BDloglikelihood.PO: Calculate log likelihood of Partially Observed BD process

Description

Calculates the log likelihood of a "partially observed birth-death-immigration process."

Usage

# S3 method for CTMC_PO_1
BDloglikelihood.PO(partialDat, L, m, nu,  n.fft = 1024)
# S3 method for CTMC_PO_many
BDloglikelihood.PO(partialDat, L, m, nu,  n.fft = 1024)
# S3 method for list
BDloglikelihood.PO(partialDat, L, m, nu,  n.fft = 1024)
BDloglikelihood.PO(partialDat, L, m, nu, n.fft = 1024)

Arguments

L

lambda, birth rate.

m

mu, death rate.

nu

nu, Immigration rate.

partialDat

Either of class "CTMC_PO_many", or of class "CTMC_PO_1" or the latter's analog in list form, ie a list with the two components "states" and "times" for the "list" and default versions of this method.

n.fft

precision for riemann integration / fast fourier transform.

Value

Real number.

Details

Immigration can be arbitrary here. Calculates likelihood of the b-d-i proces when it is observed at discrete timepoints.

Examples

Run this code
# NOT RUN {
library(DOBAD)
T=25;
L <- .3
mu <- .6
beta.immig <- 1.2;
initstate <- 17;

#generate process
dat <- birth.death.simulant(t=T, lambda=L, m=mu, nu=L*beta.immig, X0=initstate);
#"observe" process
delta <- 2
partialData <- getPartialData( seq(0,T,delta), dat);
#calculate the likelihood
BDloglikelihood.PO(partialDat=partialData, L=L, m=mu, nu=beta.immig*L);
# }

Run the code above in your browser using DataLab