Hello everybody and thanks in advance.
I'm wondering how to create tables in Stata 16 after a loop via foreach command.

Say...

foreach var of varlist co1 sv1 ef_av1 {
spearman lvls_sp1 `var'
}

In this example I do a spearman correlation of several variables versus a single variable and I want as output a table with 3 columns: variable name, z and p values.

I'm not sure if this post is a duplicate of other posts but I didn't find the answer to my question.
Thanks again.

Gianfranco