Hello,
I have a variable, date that is empty.
and a series of other date variables that contain date data: ecdate bcdate mhdate...
I also have a string variable, prefix, that contains string values such as: ec, bc, mh ...
How can I replace date with the value in one of the other date variables (i.e. ecdate bcdate mhdate...) for rows where the variable name begins with the value of prefix?
I hope I explained clearly enough.
Thank you!
Related Posts with if [varname] = [values]?
Stata- margins and rifreg commandHi, We have a problem with margins after rifreg command: it works without writting xi in front of ri…
Generating a New Variable based on Conditional IF StatementsHello STATA Experts: I am trying to create a new variable based on the existence of certain conditio…
Rosenbaum BoundsHi, I have conducted propensity score matching using the WHO-5 Mental Health Index as my outcome va…
How to get the significance level stars for the coefficients in thresholdreg cammand for (Hansen, 2000) Threshold Estimation __________________________________________________ ____________________ Thres…
Assigning value "1" to a dummy variable when another variable reaches its max, for each individual across choice alternativesI have a dataset of about 3800 observations. This dataset is in long form: I have about 760 individu…
Subscribe to:
Post Comments (Atom)
0 Response to if [varname] = [values]?
Post a Comment