Dear All

I am try trying to construct an index, using Unobserved Component Model (UCM) and State Space Model (SSM) in Stata, but I am really struggling with the right syntax/command.
I have already used Principal Component Analysis (PCA) but a lot of observations were dropped in the process.
With UCM and SSM; I have read a number of articles/journals on them but I do not have a good grasp of the commands. I got different kinds of error when I follow/use the ‘Statistics>Time-Series>UCM or Statistics>Time-Series>SMM’ routes in Stata.

I understand UCM and SSM are primarily designed for forecasting purposes but they have also been used to construct indices.


The whole idea of what I am doing is to use 3 different methods/models to construct the same index and see how they perform when used for further analysis:

-I am keeping the index constructed with PCA.

-I want to use UCM to construct another index without using Kalman Filter to address missing observation:
After dropping an observation due to having too many missing observations, I have 5 variables left to construct the index.
3 of the 5 variables are fairly complete (they have insignificant missing observations) while 2 of them have significant missing observations.
Following kaufmann et al (2010) in the construction of World Governance Indicator: I want the UCM to construct the index with any combination of 3 (or more) variables from the 5 variables; the 3 variables must include at least 2 of the 3 variables that are fairly complete variables and at least 1 of the 2 variables with significant missing observations.

-For SSM; I intend to use Kalman Filter to address missing observations when constructing the index with the model.

I need assistance on the UCM and SSM commands I need to construct the index with Stata.


I will provide further information if needed.


Your assistance will be very much appreciated.

Thank you.