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.
Related Posts with how to select any elements of a matrix randomly ?
Clarification of Results InterpretationI am conducting a cross-sectional study of UK firms to investigate the relationship between boardroo…
merging two data setshello, my project involves merging two very large data sets . I used an id number to merge the two d…
p-value for comparison of adjusted curves from RocregHello, I am trying to compare two curves generated using rocreg - one curve that is not adjusted and…
Is there no way to include "industry fixed effects" in an FE regression?Dear Stata community, I am running a model of the following form: xtset CompanyID Year, yearly xtr…
Drop base variables from fvexpand listI want to modify the variable list produced by fvexpand, e.g. Code: . webuse nhanes2f, clear . f…
Subscribe to:
Post Comments (Atom)
0 Response to how to select any elements of a matrix randomly ?
Post a Comment