I am trying to build an index on infrastructure and compare the index over the years and between nations. Since the variables are highly correlated with each other, review has suggested me to proceed with PCA for index construction. All tutorials show PCA reducing questions/variables like in cross sectional data. For time series data, I am having variables like road length, accidents, density, unsurfaced roads etc for 20 years on India. For panel data, same variables will be available for 20 years statewise. I need to reduce them into components using scores. Can I use PCA? Does it calculate factor loadings across time the same way it does for cross sections? Will the same hold for panel data. I propose to do the analysis in Stata.