I am trying to create a distance matrix with the following piece of code
proc distance data=sample shape=SQR out=Dist method=Euclid ;
var interval(a2--a6 / std=Std);
Although I am getting the output but all the variable names its taking from a1 have an underscore before it, for example a1 has values 1,2 ,3 ,4 ,5 ....and so, and in the distance matrix the variable names become _1, _2, _3, _4, _5... and so on.
Could anybody please tell me the reason and guide me the way to remove the same.
Thanks in advance !
A SAS name cannot begin with a numerical digit (0 .. 9).
Therefore, when SAS has to automatically create variable names from numerical values, it prefixes the underline.
If you want this to be different, make a1 of type char, containing valid names.
You also might want to consider using the prefix= option in the proc distance statement.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.