pw2pn {countHMM}R Documentation

pw2pn

Description

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

Usage

pw2pn(N,parvect,stationary,sup)

Arguments

N

Integer, number of states.

parvect

Vector of working parameters.

stationary

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

sup

Integer, determines the upper bound of the support of the state-dependent distributions.

Value

A list of natural parameters.

Examples

# transforming natural parameters to working paramters
parvect = 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)
# transforming working parameters to natural parameters
pw2pn(N=2,parvect=parvect,stationary=TRUE,sup=41)

[Package countHMM version 0.1.0 Index]