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?
Clustering SEsHi all, I have a question regarding some clustering of standard errors. I read a great paper by M. …
Predicting counterfactual from reghdfeDear Statlisters, I am trying to compute a counterfactual prediction if a certain explanatory varia…
Using EGEN to Create Count VariableHello Statalisters, I am trying to create a variable that counts the number of times a particular c…
SEM panel model with three variables: cross-lagged vs synchronousI have limited training in SEM and have a couple of questions about a somewhat complicated model dec…
Regressions Table in StataHow to create a table in Stata which shows the difference of two regression results previously run? …
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