Hi Statalist

This probably has a very simple solution but I am struggling to figure it out.

For a panel dataset, we can readily identify time-invariant & time-varying variables by -xtsum- and the time-invariant variables are those with a Within standard deviation of 0.

But is there a way to tag/identify those variables that are time-varying or invariant in such a way this identification can be used for later procedures? For example, suppose I want to -reshape wide- and instead of typing out -reshape wide <time-varying1> <time-varying2> <time-varying3>, i(id) j(time)- (there are >100 variables altogether) I can simply use the variables already tagged as time-varying.

The closest information I found is https://www.stata.com/support/faqs/d...ions-in-group/ but my question differs in that I am not looking to list observations within a column but to identify the whole column.

Thanks.