I have groups of variables contactoutcome_con_<y>_<x> and contactmethod_con_<y>_<x>, where x is a program from 1-8 and where y indexes the contact attempt (goes from 1-30) associated with that program. For example, contactoutcome_con_30_8 is the outcome of the 30th contact attempt made by the 8th program, and contactmethod_con_30_8 is the contact method that was used for that attempt. I need to generate a new variable "contact_success" based on the values of these two variable. For example, contact_success should = 0 if contactoutcome_con_<y>_<x>==9 AND contactmethod_con_<y>_<x>==11. What is the shortcut for doing this for all the 240 matching contactoutcome_con_<y>_<x> and contactmethod_con_<y>_<x> pairs? Thanks in advance!
Related Posts with Shortcut for generating new variables based on many existing
Combination of Heat- and Spineplot ("weighted" heat map)?Dear all I hope I can explain what I am looking for ... I want to generate a two-dimensional histogr…
boost pluginDear members, I am trying to using generalized boost regression model for my data. But I found erro…
Match it commandHi all, I got a question to the command "matchit". Thank you first for your help. Right now, I am …
Please create matrix with spweightxtHello Mr / Mrs Would you like to explain with an excel data's example the creation of a weight matr…
icd9, invalid codesHi all, I am working with HCUP NIS files for year 2014. I run the following code: . icd9 check …
Subscribe to:
Post Comments (Atom)
0 Response to Shortcut for generating new variables based on many existing
Post a Comment