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

Description Usage Arguments Details Value Author(s) Examples

View source: R/BD_EM.R

Description

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

Usage

1
2
3
4
5
6
7
## S3 method for class 'CTMC_PO_1'
BDloglikelihood.PO(partialDat, L, m, nu,  n.fft = 1024)
## S3 method for class 'CTMC_PO_many'
BDloglikelihood.PO(partialDat, L, m, nu,  n.fft = 1024)
## S3 method for class '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.

Details

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

Value

Real number.

Author(s)

charles doss

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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);

DOBAD documentation built on May 2, 2019, 3:04 a.m.