Command Reference : Command Reference

 switchreg Interactive Use Commands
Estimate a switching regression model (simple exogenous or Markov).
Syntax
switchreg(options) dependent_var list_of_varying_regressors [ @nv list_of_nonvarying_regressors ] [ @prv list_of_probability_regressors ]
List the switchreg keyword, followed by options, then the dependent variable and a list of the regressors with regime-varying coefficients, following optionally by the keyword @nv and a list of regressors with regime-invariant coefficients, and by the keyword @prv and a list of regressors that enter into the transition probability specification.
The dependent variable in switchreg may not be an expression. Dynamics may be specified by including lags of the dependent variable as regressors, or by specifying AR errors using the AR keyword. The latter incorporate mean adjusted lags of the form specified by the “Hamilton-model.”
Options

 type=arg Type of switching: simple exogenous (“simple”), Markov (“markov”). nstates=integer (default=2) Number of regimes. heterr Allow for heterogeneous error variances across regimes fprobmat=arg Name of fixed transition probability matrix allows for fixing specific elements of the time-invariant transition matrix. Leave NAs in elements of the matrix to estimate. The element of the matrix corresponds to . initprob=arg (default=“ergodic”) Method for determining initial Markov regime probabilities: ergodic solution (“ergodic”), estimated parameter (“est”), equal probabilities (“uniform”), user-specified probabilities (“user”).If “initprob=user” is specified, you will need to specify the “userinit=” option. userinit=arg Name of vector containing user-specified initial Markov probabilities. The vector should have rows equal to the number of states; we expand this to the size of the initial lag state vector where necessary for AR specifications.For use in specifications containing both the “type=markov” and “initprob=user” options. startnum=arg (default=0 or 25) Number of random starting values tried. The default is 0 for user-supplied coefficients (option “s”) and 25 in all other cases. startiter=arg (default=10) Number of iterations taken after each random start before comparing objective to determine final starting value. searchnum=arg (default=0) Number of post-estimation perturbed starting values tried. searchstds=arg (default=1) Number of standard deviations to use in perturbed starts (if “searchnum=”) is specified. seed=positive_integer from 0 to 2,147,483,647 Seed the random number generator.If not specified, EViews will seed random number generator with a single integer draw from the default global random number generator. rnd=arg (default=“kn” or method previously set using rndseed Type of random number generator: improved Knuth generator (“kn”), improved Mersenne Twister (“mt”), Knuth’s (1997) lagged Fibonacci generator used in EViews 4 (“kn4”) L’Ecuyer’s (1999) combined multiple recursive generator (“le”), Matsumoto and Nishimura’s (1998) Mersenne Twister used in EViews 4 (“mt4”).
In addition to the specification options, there are options for estimation and covariance calculation.