get.P: Method to compute the value of P

View source: R/smm.R View source: R/allgenerics.R

get.PR Documentation

Method to compute the value of P

Description

Method to compute the value of P (See equation (3.33) p.59).

Usage

get.P(x, k, states = x$states, var = FALSE, klim = 10000)

Arguments

x

An object of S3 class smmfit or smm.

k

A positive integer giving the time horizon.

states

Vector giving the states for which the mean sojourn time should be computed. states is a subset of E.

var

Logical. If TRUE the asymptotic variance is computed.

klim

Optional. The time horizon used to approximate the series in the computation of the mean sojourn times vector m (cf. meanSojournTimes function) for the asymptotic variance.

Value

An array giving the value of P_{i,j}(k) at each time between 0 and k if var = FALSE. If var = TRUE, a list containing the following components:

  • x: an array giving the value of P_{ij}(k) at each time between 0 and k;

  • sigma2: an array giving the asymptotic variance of the estimator \sigma_{P}^{2}(i, j, k).


corentin-dev/smmR documentation built on April 14, 2023, 11:36 p.m.