Dear Stata community,
I have the following string variable r1etab that has multiple observations separated by a space as follows:
r1etab Freq. Percent Cum.
--- 31 9.87 9.87
attention_rapide 15 4.78 14.65
attention_rapide autre_a_preciser 1 0.32 14.97
autre_a_preciser 9 2.87 17.83
bon_service 11 3.50 21.34
bon_service attention_rapide 16 5.10 26.43
bon_service medicaments_facilement_di.. 4 1.27 27.71
medicaments_facilement_disponibles 6 1.91 29.62
medicaments_facilement_disponibles au.. 20 6.37 35.99
proximite 79 25.16 61.15
proximite attention_rapide 7 2.23 63.38
proximite bon_service 10 3.18 66.56
proximite bon_service attention_rapide 1 0.32 66.88
proximite bon_service medicaments_fac.. 3 0.96 67.83
proximite medicaments_facilement_disp.. 4 1.27 69.11
proximite service_abordable 11 3.50 72.61
proximite service_abordable bon_servi.. 1 0.32 72.93
proximite service_abordable bon_servi.. 2 0.64 73.57
service_abordable 7 2.23 75.80
service_abordable attention_rapide 27 8.60 84.39
service_abordable bon_service 42 13.38 97.77
service_abordable bon_service attenti.. 3 0.96 98.73
service_abordable bon_service medicam.. 1 0.32 99.04
service_abordable medicaments_facilem.. 3 0.96 100.00
When I tabsplit, the result is what I would like to have as a variable with observations
r1etab Freq. Percent Cum.
31 6.40 6.40
attention_rapide 71 14.67 21.07
autre_a_preciser 30 6.20 27.27
bon_service 94 19.42 46.69
medicaments_facilement_disponibles 43 8.88 55.58
proximite 118 24.38 79.96
service_abordable 97 20.04 100.00
Total 484 100.00
I would like to have a variable that splits these observations, not make them separate variables as I have seen in other posts about extracting string variables. Thank you!
Related Posts with Substring strvar into observations, not variables
Esttab or Estout for IRRHello Statalist, I am trying to get estout or esttab to give show IRR rather than coefficients. Bel…
Equivalent to glmer (R) in stata? for a GLM mixed models (Gamma distribution)Hi all, I am trying to get regression parameters from for a simple experiment for time response wit…
Oxaca Model InterpretationDear All, Below is an except of my results from the Oxaca model Country A Country B Male …
Dummy variableWill this be right if I create a new variable say games to have values of 1 from each variable Var…
Setting an alternating number count within a loopHello, I am attempting to create a loop that goes through a sequence of variables. There are three d…
Subscribe to:
Post Comments (Atom)
0 Response to Substring strvar into observations, not variables
Post a Comment