| NewPSTR | R Documentation |
Create an R6 object of class "PSTR" to be used as the main container for
Panel Smooth Transition Regression (PSTR) modelling in this package.
You typically call NewPSTR() once, and then pass the returned object to
specification, estimation and evaluation functions.
NewPSTR(data, dep, indep, indep_k = NULL, tvars, im = 1, iT)
data |
A tibble containing the panel in long format. The number of rows must be
|
dep |
A single column index or a single column name specifying the dependent variable. |
indep |
A vector of column indices or column names specifying the regressors in the linear part. |
indep_k |
Optional. A vector of column indices or column names specifying the regressors
in the non-linear part. If |
tvars |
A vector of column indices or column names specifying the candidate transition variables. |
im |
Integer. The maximal number of switches used in linearity-related tests.
Default is |
iT |
Integer. The time dimension (number of time observations per individual). |
The candidate transition variables in tvars will be stored in the object
and can be tested one by one by functions such as LinTest.
Missing values in the dependent variable, linear regressors, non-linear regressors,
or transition variables are removed internally (row-wise).
The number of individuals N is inferred from nrow(data) and iT
after removing missing values.
An R6 object of class "PSTR".
LinTest, WCB_LinTest, EstPSTR,
EvalTest, WCB_TVTest, WCB_HETest.
pstr <- NewPSTR(
Hansen99,
dep = "inva",
indep = 4:20,
indep_k = c("vala", "debta", "cfa", "sales"),
tvars = c("vala", "debta"),
iT = 14
)
# print summary (your R6 print method)
pstr
print(pstr, mode = "summary")
# after running tests/estimation, you can print other sections
# print(pstr, mode = "tests")
# print(pstr, mode = "estimates")
# print(pstr, mode = "evaluation")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.