- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi everybody
I'm new to SAS EM, so it may be a simple question to some.
I want to rename a variable, which I derived from a consolidation tree. The output name of my new varaible is just _NODE_, which doesn't say much. How can I rename it? I have read, that I maybe could use the transform variables node - but I can't figure out how.
Thanks!
/Louise
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
As you note, the Applied Analytics Using Enterprise Miner notes (page 9-28) suggest using the Transform Variables node to change the name, but may be simpler to just perform a DATA step in the SAS Code node. Assuming you are inputting and outputing a training data set, the DATA step might look something like the following:
data &EM_EXPORT_TRAIN;
set &EM_IMPORT_DATA (rename=(_NODE_=<newname>));
run;
Hope this helps.
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can use the approach described by @candby where you would need to do a data step for each data partition being passed through (e.g. Train, Validate, Test) but those changes would not be reflected in the resulting score code. It might be easier to just add a line to the Score code section of a SAS Code node such as the following:
MyNewVar = _NODE_;
The new variable MYNEWVAR will contain the value of _NODE_ in every resulting data set that is passed through the modeling node and/or scored by score code from a subsequent Score node. Admittedly, you are not renaming the variable but still can accomplish the desired outcome.
Hope this helps!
Doug