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]?
learning STATAHello All, I am a beginner and trying to learn STATA on my own, I have weak biostatistics background…
Generate data with missing values and specific mean / standard deviationI generated a variable foo: Code: clear set obs 100 gen foo=rnormal(5,2) I then do the following…
Pooled olsHi all, I am trying to add corrections for year (year-count variable) and units (countries) when ru…
Firm and Industry Effects Together?Hi, In the context of corporate finance, some studies claim to use firm and industry fixed effects …
Propensity Score Matching: What should I expect from the results?Hi all, I am working on a probability model by utilising a panel probit regression. One of the inde…
Subscribe to:
Post Comments (Atom)
0 Response to if [varname] = [values]?
Post a Comment