STATA:随机点名

local sj=subinstr(subinstr("`c(current_time)'",":","",.)," ","",.)
local wjma="`sj'"
set seed `wjma'
clear
local shu= int(100*runiform() )
// local xm="ab cd ef gh add"
// local xma=split(`xm`)
set obs 100
disp `shu'
gen vab="张三"+string(_n)
if("`shu`"==string(_n)) disp vab[_n]
list  vab if _n==int(`shu'),noheader noobs

 

posted @ 2023-03-08 07:46  myrj  阅读(36)  评论(0编辑  收藏  举报