Hello,

How can I transfer multiple values stored under a local macro into a variable?

Below is what I tried:

gen mnbScore = .

python: mnbScore1 = Y_mnb_score.tolist()
python: mnbScore1_str = ' '.join(str(e) for e in mnbScore1)
python: Macro.setLocal('mnbScore1', mnbScore1_str)

// the reason for the 'replace mnbScore = `mnbScore1' ' is because
// if I try to do ' roctab compliance `mnbScore' ',
// Stata throws the following error:
// "factor-variable and time-series operators not allowed"
replace mnbScore = `mnbScore1' // This line causes an error

How can I store the values under the macro `mnbScore1' under the variable 'mnbScore'?

and if there is no way to do this, how can I avoid this "factor-variable and time-series operators not allowed" error (so that I wouldn't need to transfer the values from local macro to a variable)

Thank you,