Hello everyone!

I'd like to save two scalars generated in a loop to a variable. My current code reads as follows:
-------------------------
forvalues i = 1(1)158 {
gen z = _b[_cons] + _b[republican]*republican + _b[ideology]*ideology + _b[vulnerability]*vulnerability + _b[seniority]*seniority if vote_id == 'i'
gen Phi_z = normal(z)
gen newvote = 1 if vote_id == 'i'
replace newvote = 0 if Phi_z < .5 if vote_id == 'i'
sum vote_behavior if vote_id == 'i'
scalar vote_old = r(mean)
sum newvote
scalar vote_new = r(mean)
}
-------------------------

I'd like to save the scalars vote_old and vote_new to new variables. I'd appreciate any suggestions on how to do that.

G.