I have a variable named S_Kx, S_Jx S_Yx, S_Sx
I want to nix all variables that dont' have the same beginning as they do with after _ (i.e. S_Sx would be kept, but S_Kx and all others would be dropped)
therefore
v_vx would be kept
!v_vx would be dropped
v can be ANY letter of the alphabet
how could I approach this?
Related Posts with Comparing string variable names
Population size using SVY too smallHello; I did the following on Stata: svy:tab b8_under5, obs percent And the results I got were odd…
STATA coefplot: plot other coefficients benchmark to one coefficientI'm using coefplot to plot the coefficients on xlag3, xlag2, xlag1, x, xlead1,xlead2,xlead3 from my …
SVYSET and SVY:tab helpHello, I have the following two SPSS commands. This is what I have from the SPSS codebook: CSPLAN A…
Create observations for neighboring statesHello, I have a dataset of firms investments in different states: e.g. Firm A invests $1million in …
Test for the difference between two point predictions obtained from separate regressionsDear colleagues, I would like to perform a statistical test of the difference between two point pre…
Subscribe to:
Post Comments (Atom)
0 Response to Comparing string variable names
Post a Comment