I am estimating a Markov Switching models using the mswitch command.
This code runs for country 1 but not for country 2. It shows "initial values not feasible". Not able to figure out.
Any help will be greatly appreciated.
The code and data are given below.
Code:
keep if id==2 tsset year, yearly mswitch dr x, switch(y) states(2) varswitch
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str52 country int year float(x y id) "Argentina" 1990 10.359536 4.6313224 1 "Argentina" 1991 7.675044 6.078011 1 "Argentina" 1992 6.598187 8.132793 1 "Argentina" 1993 6.909351 9.3138 1 "Argentina" 1994 7.529949 10.604397 1 "Argentina" 1995 9.68041 10.091013 1 "Argentina" 1996 10.428596 11.07787 1 "Argentina" 1997 10.56085 12.77533 1 "Argentina" 1998 10.415582 12.934446 1 "Argentina" 1999 9.827174 11.55557 1 "Argentina" 2000 10.986375 11.63607 1 "Argentina" 2001 11.579008 10.273248 1 "Argentina" 2002 28.382597 13.370128 1 "Argentina" 2003 25.93094 14.713805 1 "Argentina" 2004 23.84762 16.845026 1 "Argentina" 2005 23.245876 17.305395 1 "Argentina" 2006 23.026695 17.406786 1 "Argentina" 2007 22.66275 18.282421 1 "Argentina" 2008 22.0609 18.341772 1 "Argentina" 2009 19.560986 14.496141 1 "Argentina" 2010 18.933823 16.03719 1 "Argentina" 2011 18.44921 16.756947 1 "Argentina" 2012 16.23786 14.288683 1 "Argentina" 2013 14.617173 14.716756 1 "Argentina" 2014 14.405478 14.001315 1 "Argentina" 2015 10.705652 11.780574 1 "Argentina" 2016 12.527095 13.566792 1 "Argentina" 2017 11.242722 13.98061 1 "Argentina" 2018 14.280518 16.419928 1 "Australia" 1990 15.146525 17.073702 2 "Australia" 1991 16.061407 16.194105 2 "Australia" 1992 16.691364 16.4189 2 "Australia" 1993 17.572792 17.893728 2 "Australia" 1994 18.005312 18.520817 2 "Australia" 1995 17.916885 19.884666 2 "Australia" 1996 18.939194 19.393137 2 "Australia" 1997 19.17481 18.9 2 "Australia" 1998 19.59558 20.474854 2 "Australia" 1999 18.343893 20.790756 2 "Australia" 2000 19.43466 21.59435 2 "Australia" 2001 22.22572 22.13949 2 "Australia" 2002 20.774593 20.78268 2 "Australia" 2003 19.095085 21.20106 2 "Australia" 2004 17.203285 19.91745 2 "Australia" 2005 18.265102 21.00608 2 "Australia" 2006 19.89392 21.710306 2 "Australia" 2007 20.20361 21.84783 2 "Australia" 2008 20.16167 22.70866 2 "Australia" 2009 23.00481 22.79309 2 "Australia" 2010 19.810007 20.839664 2 "Australia" 2011 21.436417 20.470316 2 "Australia" 2012 21.48083 21.72952 2 "Australia" 2013 19.95617 21.25226 2 "Australia" 2014 21.039455 21.467035 2 "Australia" 2015 19.984846 21.50953 2 "Australia" 2016 19.251057 21.526585 2 "Australia" 2017 21.1932 20.5768 2 "Australia" 2018 21.804657 21.387604 2 end
0 Response to Estimation of Markov Switching models
Post a Comment