變量過多(過長)時暫元的分拆
use data_done,clear
local v1 "Premium_Pre_Bid_1Day Premium_Pre_Bid_1Week Premium_Pre_Bid_4Weeks Deal_Value"
local v2 "Deal_Enterprise_Value_to_Sales Deal_Enterprise_Value_to_EBITDA Deal_Enterprise_Value_to_EBIT enterprise_value_announce enterprise_value_effective"
local v3 "Initial_Offer_Price Acquired acquiror_stock_price_one_day acquiror_stock_price_on_day "
local v4 "Deal_Equity_Value_to_Net_Income equity_value_announce equity_value_effective "
local v5 "target_stock_price_onday target_stock_price_oneday Share_Price_Paid_by_Acquiror Held Sought"
local v6 "Rank_Value_Credit af_rank_value_credit al_rank_value_credit tf_rank_value_credit tl_rank_value_credit"
local vv "`v1' `v2' `v3' `v4' `v5' `v6'"
foreach v of local vv{
#去掉特殊字符
replace `v'=subinstr(`v',",","",.)
cap drop _`v'
gen _`v'=real(`v')
drop `v'
rename _`v' `v'
}
save data_done,replace