Dear Stata experts,
I want to replace all string values starting with 'QC_6200945' of the variable SampleID with only QC_6200945 (i.e. keeping only QC_6200945 in the name). The data looks like this:
SampleID
QC_6200945+_c_31
QC_6200945+_c_32
QC_6200945+_c_33
QC_6200945+_c_34
etc.
I have Stata 15.
Thank you in advance.
Related Posts with Replacing Values
Correlations between two variables repeatedly measuredHi, I have a panel data of 30 subjects with 8 longitudinal observations each. I have measured 10 pl…
Adjusting for time-varying covariates in linear mixed modelsHi, I have a question about adjusting for time-varying covariates using multilevel linear mixed mod…
Tab the frequency of multiple variables with the same labelI'm sorry if this has been asked a thousand times, but I haven't found the answer by searching the f…
Problem with sgmediation after using SEMHello everyone, I used SEM to construct 5 factors using 29 variables. After, I did some regressions…
Create a new variable with If -statementsHello Statalists, I ’am quite a beginner in Stata and statistics in general. I have a large data sa…
Subscribe to:
Post Comments (Atom)
0 Response to Replacing Values
Post a Comment