I have this quite open question as I have a large longitudinal dataset with multiple options. However, I will try my best to describe my wish for support.

Is it possible to let Stata generate a combined score/index/indicator based on a model? Let us say I have four exposure variables; X1 X2 X3 and X4. They can be continous or categorical or a mix. I would like them to predict an outcome (could be continous or categorical) and I would like Stata to investigate the impact of each exposure variable. In case X2 predicts outcome better that X1, X2 should have more influence than X1 in the combined score.

An example could be:
I would like to develop a screening tool to idenfication of persons in risk of stroke. I have this longitudinal dataset with persons with stroke describing smoking status, alcohol consumption, blood pressure and activity level prior to the stroke. Can I make a weighted screening tool assesseing smoking status, alcohol consumption, blood pressure and activity level in order to identify the persons in highest risk of having a stroke?