I am trying to use merge on two data sets, one which has a value for PID for approximately 1700 observations. The other data set has variables named PID which have values for 366 days of a year, but to merge them I need to create a variable for those with the name PID so I have something to merge to.
Trick is, how to create a new variable with the string name to match what is in the other dataset?
Or there may be easier ways to do this. Everything I see in merge requires I have a variable with which to merge or joinby.
Thank you.
dp
Array Array
Related Posts with How to create a string variable with the string value of the variable name?
Bland-Altman difference Plot problem with codeHi all, I have been trying to draw a bland -altman difference plot Code: Code: batplot systolicd…
whether significance can vary between estimation coefficients and marginal effects coefficient in multinomial logit model. …
risk ratio versus risk difference in meta analysisHi, I conducted a meta-analysis including two RCTs using random effects model (DerSimonian-Laird) us…
Define 2 groups based in a numeric variableHello! I am a new stata user. I want to define 2 groups (c4dnegative and c4dpositive) based on a num…
Sequential partialling out of variables in linear regression: Is there such an algorithm and how is it called?Good afternoon, Suppose that my task is to obtain the residual vector in a multiple regression of Y…
Subscribe to:
Post Comments (Atom)
0 Response to How to create a string variable with the string value of the variable name?
Post a Comment