Hey there SL,
This might be pretty basic but I am struggling to do this or find an answer in the forums.
I have information on a sample of several thousands of patients, but I have it in the form of a 9x4 table (9 values of category A as rows, 4 variables of category B as columns, and then the frequency of patient to each pairing of A:B). I needed to convert this into a dataset of observations so I can run tests on it.
Example, I have this:
__B1 B2 B3 B4
A1 5 20 15 5
A2 ....
A3
A4
And I need to have this:
___varA varB
ID1 1. 1
ID2 1. 1
ID3 1 1
ID4 1 1
ID5 1 1
ID6 1 2
....
Is there any way of converting the table into a list other than by hand? The only similar thing I could find was the cci command that directly does a chi2 from a inputed table, but it only works for 2x2 and I am restricted to chi2.
Thank you!
This might be pretty basic but I am struggling to do this or find an answer in the forums.
I have information on a sample of several thousands of patients, but I have it in the form of a 9x4 table (9 values of category A as rows, 4 variables of category B as columns, and then the frequency of patient to each pairing of A:B). I needed to convert this into a dataset of observations so I can run tests on it.
Example, I have this:
__B1 B2 B3 B4
A1 5 20 15 5
A2 ....
A3
A4
And I need to have this:
___varA varB
ID1 1. 1
ID2 1. 1
ID3 1 1
ID4 1 1
ID5 1 1
ID6 1 2
....
Is there any way of converting the table into a list other than by hand? The only similar thing I could find was the cci command that directly does a chi2 from a inputed table, but it only works for 2x2 and I am restricted to chi2.
Thank you!
Comment