I am trying to do a mortality search for a specific disease (X), in a national database. what is the difference between using regex and strpos?
gen X=.
replace X=1 if regexm(Cause of dead,"X")==1
vs
replace X=1 if strpos(Cause of dead,”X”)>0
Related Posts with Difference - regex vs strpos?
Monte Carlo simulation comparing output for OLS and 2SLS by saving beta and se's in matrixHi In my simulation I am trying to compare output from OLS and 2SLS. I have the following code which…
Stripplot -Hi to everybody Below the dataset Code: * Example generated by -dataex-. To install: ssc install …
Combining two categorical income variablesHi, I'm using a cumulative dataset of the European Social Survey from 2002-2018. In my analysis I wa…
dropping observations if variable is zero between time periodHello, Could someone please help me dropping some observations? I'm investigating the influence of …
Using drop-command for a variable depending on the value of another variableHi, for my cumulative dataset (European Social Survey 2002-2018) I have a variable which measures if…
Subscribe to:
Post Comments (Atom)
0 Response to Difference - regex vs strpos?
Post a Comment