I am having s panel data on macro variables for 72 countries
(I. e. ;gdp, inflation etc) and a continuous quality indicator variable . My models suggests that the quality indicator is a factor that determines gdp to reach its potential output. I would like to construct an index as a discrete continuous variable for each panel defined as :
​​​​gpd(potential) - gdp current) /indicator (potential) - indicator (current)

In other words I need to find what is the ideal value the indicator should assume for each period in order gdp to be on it's potential value. Once found then need to construct the index as above

I will take the hp filter in order to calculate potential gdp and gdp gap. My question is if it is possible to use hp filters or any other filter on quality variables or another way is more appropriate (I e likelihood) ? If so, which one? Can I do signal extraction on quality variables?

Mario