I have a table with variables:
Item N Mean n_A n_B n_C n_D n_0 n_1 n_2 n_3 n_4 PVal pBis
I want to get it to the form with variables:
Item Stats N Value
Where Stats is broken up into 4 different rows. N, pBis, PVal, Mean. and Value gives the value of those stats.
such as...
Item Stats Nd Value
A1 N 100 100
A1 pBis 100 0.4
A1 PVal 100 0.28
A1 Mean 100 0.56
B1 N 150 150
B1 pBis 150 0.31
B1 PVal 150 0.46
B1 Mean 150 0.46
C1 ............
etc.
I can "guess" that perhaps n_A is supposed to be an n associated with something like A but what are n_0 n_1 and so on?
And if there is an A1 I tend to suspect there may be an A2, A3 or such lurking somewhere.
You might consider providing a data step that actually gives us some values to work with.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.