Hi Stata folks, I am working on a dataset where each ID is associated with a numeric value comprised of 0 and 1s. What I need to do now is to extract part of the numeric values based on a rule. For instance, for a value of 1001100, I need to extract the last three digits (100); for a value of 1010110, I need to extract the last two digit (10); for a value of 1011000, I need to extract the last four digits (1000). The rule is to extract the part where the last 1 was seen (together with the 0s behind the last 1s). Is there a way to achieve this using stata? Thanks!
Related Posts with How to split numeric variables based on rule
Export Regressions to Different Sheets in Same Excel Doc.I have been trying to figure out a way to automate my regression output such that each set of regres…
FIXED EFFECT MODEL, small saple size.Dear all, I am regressing the impact of Netflix subscriptions on theatrical admissions in 16 countri…
xtgcause interpretationI have run a test for Granger non-causality in heterogeneous panels using the procedure proposed by …
Test of whether country variance is statistically significantI'm looking at social origin effect on occupational attainment (in terms of ISEI) in three different…
Simulation Study: Panel data xtlogit regressionHi everyone, Unfortunately I'm not able to download the dataex package, since I'm working on an ext…
Subscribe to:
Post Comments (Atom)
0 Response to How to split numeric variables based on rule
Post a Comment