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 ?
How to realize data deformation operationHow to perform the following data operations as follows: (1) Place the data scattered in multiple r…
Performing Regressions on Panel and Time Series DataGood afternoon, first time poster here. I'm an undergraduate student trying to run some regressions …
Clarifying interpretation of marginal effects after reghdfeHello, I am looking for clarification on post-estimation margins command after reghdfe. I am running…
Automatically run a do file when openedHello all, Is there a feature that will have Stata automatically run designated DO files when they …
OLS vs. Ordered Logistic RegressionHello, I have five employee-level variables as below, and I was wondering if I could use the OLS wi…
Subscribe to:
Post Comments (Atom)
0 Response to how to select any elements of a matrix randomly ?
Post a Comment