PSTR (version 1.0.1)

EstPSTR: Estimate the PSTR model.

Description

This function implements the estimation of the PSTR model.

Usage

EstPSTR(use, im = 1, iq, par, vLower = 2, vUpper = 2,
  method = "L-BFGS-B")

Arguments

use

an object of the class PSTR, created by NewPSTR function.

im

specifies the number of switches in the transtion function. The default value is 1.

iq

a column number (in mQ) or variable name specifying the transition variable to use.

par

initial values for the parameters (\(\delta\) and \(c\)) to be optimized over. It is a vector of length im+1, where im is the number of switches.

vLower

a vector or number of the lower offsets determining the lower bounds of the parameters. The lower bounds of the parameters are par - vLower.

vUpper

a vector or number of the upper offsets determining the upper bounds of the parameters. The upper bounds of the parameters are par + vUpper.

method

the method to be used in optimization. See the function stats::optim.

Value

a new object of the class PSTR containing the results from the estimation.

The object is a list containing the components made in NewPSTR and the following new components:

iq

specify which transition variable will be used in estimation.

delta

the estimate of \(\delta\).

c

the estimates of \(c\).

vg

the values of the transition function given the estimates of \(\delta\) and \(c\) and the transition variables \(q_{it}\).

beta

the estimates of the coefficient parameters.

vU

the residuals.

s2

the variance of the residuals.

cov

the covariance matrix of the estimates which is cluster-dependency and heteroskedasticity consistent.

est

a vector of all the estimates

se

a vector of the standard errors of all the estimates which is cluster-dependency and heteroskedasticity consistent.

mbeta

a vector of the estimates of the parameters in the second extreme regime.

mse

a vector of the standard errors of the estimates of the parameters in the second extreme regime.

Details

The function needs the return value (an object of the class PSTR) from the NewPSTR. It copies the object, reuses its contents to estimate the correspdonding PSTR model, and then returns a new object of the class PSTR containing the results from the estimation. The user can choose to save the return value to a new object or simply to overwrite the object returned from NewPSTR.

The PSTR model to be estimated takes the logistic form in nonlinearity. Remember the \(g\) function in the model. It takes the form $$g(q_{it} ; \gamma, c) = \left( 1 + \exp \left( - \gamma \prod_{j=1}^{m} (q_{it} - c_j) \right) \right)^{-1}$$ with \(\gamma > 0\) and \(c_1 < c_2 < ... < c_m\). \(\gamma\) can be reparametrized as \(\gamma = \exp{\delta}\) where \(\delta\) is a real number.

The user should have obtained the information about which transition variable (\(q_{it}\)) to use (from LinTest and/or WCB_LinTest) in estimation before running the function to estimate the model.

The estimation function never change the existing values in the input PSTR object. It adds more values (attributes) into the input object and return.

See Also

NewPSTR, LinTest and WCB_LinTest

Examples

Run this code
# NOT RUN {
pstr = NewPSTR(Hansen99, dep='inva', indep=4:20, indep_k=c('vala','debta','cfa','sales'),
    tvars=c('vala'), iT=14) # create a new PSTR object

# "L-BFGS-B" is used by default
pstr = EstPSTR(use=pstr, im=1, iq=1, par=c(1.6,.5), vLower=4, vUpper=4)
# You can also choose the method yourself.
pstr = EstPSTR(use=pstr, im=1, iq=1, par=c(1.6,.5), method='CG')

print(pstr, "estimates", digits=6)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab