I am in a real bind and need some help understanding how SAS conducts a chi-squared test to compare two coefficients in a logistic regression. Specifically, I am testing whether the coefficient on the variable RHS1 is statistically different from the coefficient on RHS2. I am using the TEST...
Hi Klaz,
Thanks again for getting back to me. I do want the unique total across all columns. The code is not giving that result. Here is the code that you sent that I ran:
data f2;
set cltest end = last;
array strsort (*) $500 strs1-strs5000 ;
wrdtot = countw(code,'|');
do i=1 to...
Hi Klaz,
First, thanks so much for you help. The code you posted ran fine but it is only giving me the unique (or distinct) count for col1, which is not the distinct count across the entire group. In the sql statement I need the distinct count across all of the columns (i.e. col1, col2, col3...
Sorry, there was an error in my last post. The example should look like this.
CODE
|190|
|191|
|187|189|191|278|934|
|187|189|191|278|
|191|278|
When I run the code I get a dataset that looks like this:
outstr wrdtot total_unq
|190| 2 1
|191| 2 1
|187|189|191|278|934| 6 5
|187|189|191|278| 5...
Thanks Klaz. I ran the code, however it is only giving the number of unique codes within each cell. For example, if my dataset looks like this:
CODE
|191|
|191|
|187|189|191|278|934|
|187|189|191|278|
|191|278|
When I run the code I get a dataset that looks like this:
outstr wrdtot total_unq...
Thanks for the help. I really appreciate it. That worked great for counting the number of codes within each cell. The problem is I need to know the number of unique codes across multiple observations (or rows). See example above. Any ideas?
I am trying to count the number of unique codes in a group. Each group consist of multiple rows and the codes are pipe delimited in each cell. A sample of my dataset looks like this:
GROUP CODES
1 |231|322|414|
1 |231|322|
2 |231|
2 |231|114|
2
3
3
So in GROUP 1 there are 3 unique codes (231...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.