Dear statalist,
I have a matrix in which two or more columns are exactly same. Is there some way of keeping one of them and dropping all others?
For example, I have the matrix
1 4 2 1 1
2 7 0 2 2
3 3 5 3 3
I want to drop the last two columns since they are same as the 1st column.
Thank you in advance.
Shoummo Sen Gupta
Related Posts with Dropping repeated columns from a matrix
Convert "string" ID to numeric with non-numeric charactersI am trying to convert a non-numeric string ID variable to a numeric variable but I get an error mes…
Accessing function output that's displayed but not storedHi, I would like to store some of the output of the adjrr command in macros. The output is displayed…
Restricting ObservationsHi all, hoping this has an easy answer. I have different models which have different variables in th…
Creating a lead variable for fixed effect regressionsHi, I'm trying to run a couple of fixed effect regressions with my data. I want to understand whet…
Error: "numlist in operator invalid" while running suregHi, I have an unbalanced panel dataset. I'm receiving this error message "numlist in operator invali…
Subscribe to:
Post Comments (Atom)
0 Response to Dropping repeated columns from a matrix
Post a Comment