Description Usage Arguments Details Value Author(s) See Also Examples
This function implements the estimation of the PSTR
model.
1 2 |
use |
an object of the class PSTR, created by |
im |
specifies the number of switches in the transtion function. The default value is 1. |
iq |
a column number (in |
par |
initial values for the parameters γ or δ, and c to be optimized over. It is a vector of length |
useDelta |
whether delta is used in par in the estimation. Note that if |
vLower |
a vector or number of the lower offsets determining the lower bounds of the parameters. The lower bounds of the parameters are |
vUpper |
a vector or number of the upper offsets determining the upper bounds of the parameters. The upper bounds of the parameters are |
method |
the method to be used in optimization. See the function |
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} ; γ, c) = ≤ft( 1 + \exp ≤ft( - γ ∏_{j=1}^{m} (q_{it} - c_j) \right) \right)^{-1}
with γ > 0 and c_1 < c_2 < ... < c_m. γ can be reparametrized as γ = \exp{δ} where δ 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.
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. The default value |
delta |
the estimate of δ. |
c |
the estimates of c. |
vg |
the values of the transition function given the estimates of δ and c and the transition variables q_{it}. |
beta |
the estimates of the coefficient parameters. |
vU |
the residuals. |
vM |
a vector of the estimated time-invariant individual effect. |
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. |
convergence |
an integer code showing the convergence, see |
par |
a vector of the initial values used in the optimization. Note that the first element is always delta, no matter whether gamma is used as input. |
Yukai Yang, yukai.yang@statistik.uu.se
NewPSTR
, LinTest
and WCB_LinTest
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 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
# estimate a linear panel regression model
pstr = EstPSTR(use=pstr)
print(pstr, "estimates", digits=6)
# "L-BFGS-B" is used by default
pstr = EstPSTR(use=pstr, im=1, iq=1, useDelta=TRUE, par=c(.63,0), vLower=4, vUpper=4)
# You can also choose the method yourself.
pstr = EstPSTR(use=pstr, im=1, iq=1, useDelta=TRUE, par=c(.63,0), method='CG')
print(pstr, "estimates", digits=6)
# The estimation of a linear panel regression model with fix effects is also implemented.
pstr0 = EstPSTR(use=pstr)
print(pstr0,"estimates")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.