hi
ı couldnt find any way to get rid of this problem. in R ı solved it with Y[j,1]<-sample(get(paste("X",j,"T", sep="")),1,replace=T)
but in stata ı couldnt find how to select an element randomly from a matrix and paste it to another matrix's element?

matrix X1 = (55\60\65\70\75)
mat Y = J(10, 1, .)
mat Y [1,1] = X1[.,1]

here ı want to put an any randomly element of X1 to first element of matris Y.