Use a MCMC-MLE based on two-step procedure to estimate the dynamic panel multiple threshold model with fixed effects.
[R6::R6Class] object.
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
new()
initialize Initializing method
DPTM$new(
data,
index = NULL,
Th = NULL,
iterations = NULL,
sro = NULL,
w = NULL,
var_u = NULL,
iterlim = NULL,
restart = FALSE,
delty0 = NULL
)
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
capture_input()
Identify and capturing inputs
DPTM$capture_input(
formula = NULL,
formula_cv = NULL,
timeFE,
y1 = NULL,
q = NULL,
r0x = NULL,
r1x = NULL,
NoY = FALSE
)
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
MLE()
Maximum likelihood estimation method
DPTM$MLE(ny = 1)
ny
the number of regimes
TModel_fit()
Compute coefficients given thresholds
DPTM$TModel_fit(ga)
ga
thresholds
MCMC_process()
Use MCMC to compute thresholds
DPTM$MCMC_process(
proportion = 0.5,
types = "DREAMzs",
ADs = FALSE,
nCR = 3,
...
)
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
...
DPTM object
clone()
The objects of this class are cloneable with this method.
DPTM$clone(deep = FALSE)
deep
Whether to make a deep clone.