Learn R Programming

DPTM (version 3.0.2)

DPTM: Dynamic Panel Multiple Threshold Model with Fixed Effects (DPTM)

Description

Use a MCMC-MLE based on two-step procedure to estimate the dynamic panel multiple threshold model with fixed effects.

Arguments

Format

[R6::R6Class] object.

Public fields

coefficients

a named vector of coefficients

NNLL

the negative log-likelihood function value

Zvalues

a vector of t statistics

Ses

a vector of standard errors

covariance_matrix

a covariance matrix

duit

a vector of residuals after difference

dy0

a vector of dependent variable after difference

Th

the number of thresholds

thresholds

a named vector of thresholds

Methods


Method new()

initialize Initializing method

Usage

DPTM$new(
  data,
  index = NULL,
  Th = NULL,
  iterations = NULL,
  sro = NULL,
  w = NULL,
  var_u = NULL,
  iterlim = NULL,
  restart = FALSE,
  delty0 = NULL
)

Arguments

data

data.frame used

index

variable names of individuals and period; If a setting is not provided, defaults (the first variables in data will be as "id", while the second will be "year") will be used

Th

number of thresholds; If a setting is not provided, defaults (Th = 0) will be used

iterations

MCMC iterations (50% used for burnining)

sro

regime (subsample) proportion; If a setting is not provided, defaults (10%) will be used

w

variances ratio initial value; If a setting is not provided, defaults (automatic calculation) will be used

var_u

variances (T>=2) initial value; If a setting is not provided, defaults (automatic calculation) will be used

iterlim

the maximum number of iterations; If a setting is not provided, defaults (iterlim = 500) will be used

restart

logicals. If MLE fails, set it as TRUE

delty0

a vector of dependent variable after difference


Method capture_input()

Identify and capturing inputs

Usage

DPTM$capture_input(
  formula = NULL,
  formula_cv = NULL,
  timeFE,
  y1 = NULL,
  q = NULL,
  r0x = NULL,
  r1x = NULL,
  NoY = FALSE
)

Arguments

formula

formula of the covariates with threshold effects;If a setting is not provided, defaults (no covariates with threshold effects) will be used

formula_cv

formula of the covariates without threshold effects;If a setting is not provided, defaults (no covariates without threshold effects) will be used

timeFE

logicals. If TRUE the time fixed effects will be allowed

y1

lags of dependent variables; If a setting is not provided, defaults (the first-order lag) will be used

q

threshold variable

r0x

lower bound of threshold parameter space; If a setting is not provided, defaults (15% quantile of threshold variable) will be used

r1x

upper bound of threshold parameter space; If a setting is not provided, defaults (85% quantile of threshold variable) will be used

NoY

logicals. If TRUE the lags of dependent variables will be without threshold effects


Method MLE()

Maximum likelihood estimation method

Usage

DPTM$MLE(ny = 1)

Arguments

ny

the number of regimes


Method TModel_fit()

Compute coefficients given thresholds

Usage

DPTM$TModel_fit(ga)

Arguments

ga

thresholds


Method MCMC_process()

Use MCMC to compute thresholds

Usage

DPTM$MCMC_process(
  proportion = 0.5,
  types = "DREAMzs",
  ADs = FALSE,
  nCR = 3,
  ...
)

Arguments

proportion

the proportion of burning in the whole iterations

types

the type of MCMC, see BayesianTools::runMCMC

ADs

the parameter of MCMC, see BayesianTools::runMCMC

nCR

the parameter of MCMC, see BayesianTools::runMCMC

...

the settings of MCMC, see BayesianTools::applySettingsDefault


Method print()

print and print estimated results

Usage

DPTM$print(...)

Arguments

...

DPTM object


Method clone()

The objects of this class are cloneable with this method.

Usage

DPTM$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.