pn2pw: pn2pw

Description Usage Arguments Value Examples

View source: R/pn2pw.R

Description

Transforming natural parameters to working parameters. Not intended to be run by the user (internal function, called by the functions nLogLike and fitMod).

Usage

1
pn2pw(N,probs,gamma,delta,stationary)

Arguments

N

Number of states.

probs

Matrix with N columns which contains the state-dependent probabilities for each count.

gamma

Transition probability matrix of the Markov chain underlying the observed counts with N rows and N columns.

delta

Initial distribution vector of length N of the Markov chain underlying the observed counts. If NULL, then the stationary distribution is returned.

stationary

Logical, determines whether the initial distribution of the Markov chain underlying the observed counts is the stationary distribution.

Value

A vector of working parameters.

Examples

1
2
3
# transforming natural parameters to working paramters
pn2pw(N=2,probs=cbind(dpois(x=0:41,lambda=14),dpois(x=0:41,lambda=26)),
gamma=matrix(c(0.95,0.05,0.05,0.95),ncol=2),delta=NULL,stationary=TRUE)

countHMM documentation built on May 2, 2019, 1:06 p.m.

Related to pn2pw in countHMM...