Learn R Programming

hdMTD (version 0.1.4)

MTD-methods: Methods for objects of class "MTD"

Description

Printing, summarizing, and coefficient-extraction methods for Mixture Transition Distribution (MTD) model objects.

Value

print.MTD

Invisibly returns the "MTD" object, after displaying its relevant lag set and state space.

summary.MTD

Invisibly returns a named list with fields: call, order, Lambda, states, lags, indep, lambdas, pj, p0 (or NULL), P_dim, and P. The same information is printed to the console in a readable format.

coef.MTD

A list with parameters: lambdas, pj, and p0.

logLik.MTD

An object of class "logLik" with attributes nobs (number of transitions) and df (free parameters), honoring model constraints such as single_matrix and the independent component (indep_part).

Arguments

x

An object of class "MTD" (for print.MTD(x, ...)).

object

An object of class "MTD".

X

A vector or single-column data frame containing an MTD chain sample (required for logLik.MTD(object, X, ...)). Values must be in the model's state space.

...

Further arguments passed to or from other methods (ignored).

Details

  • print.MTD() displays a compact summary of the model: the relevant lag set (shown as negative integers) and the state space.

  • summary.MTD() computes and prints a detailed summary of the model, including order, relevant lags, state space, mixture weights, the independent distribution (if present), and a compact preview of the global transition matrix \(P\).

  • coef.MTD() extracts parameters as a list with lambdas, pj, and p0 (works for c("MTDest","MTD") objects by inheritance).

  • logLik.MTD() computes the log-likelihood of a sample under the model. Since an object of class "MTD" carries only the model parameters, a sample X must be supplied. The method honors constraints such as single_matrix and an independent component (indep_part), and returns an object of class "logLik" with appropriate attributes.

See Also

MTDmodel, MTDest for fitted models (note that "MTDest" objects inherit from "MTD"), transitP, lambdas, pj, p0, lags, Lambda, states, oscillation, perfectSample, probs, logLik

Examples

Run this code
if (FALSE) {
set.seed(1)
m <- MTDmodel(Lambda = c(1, 3), A = c(0, 1), lam0 = 0.05)

print(m)       # compact display: lags (Z^-) and state space
s <- summary(m)
str(s)

coef(m)        # list(lambdas = ..., pj = ..., p0 = ...)
transitP(m)    # global transition matrix P
pj(m); p0(m); lambdas(m); lags(m); Lambda(m); states(m)

X <- perfectSample(m, N = 400)
logLik(m, X)
}

Run the code above in your browser using DataLab