Opened 4 years ago

Closed 4 years ago

#303 closed Defect (Fixed)

data_frame to check for variable type = character vs. numeric

Reported by: Lois Haggard Owned by: Lois
Priority: *High Milestone: 2.3 - Testing
Component: IBIS-Q Version: 2.3
Severity: Unknown Keywords:
Cc: Tong Zheng

Description

When I am using user-defined cause of death, the output is a character variable. IF I try to DISPLAY the results by cause of death, I get a SAS error because I am trying to merge the numeric values in data_frame with character values from tmp.

177      !  data new;
178        length count 8;    *set length so that count value doesn't get truncated;
179        merge frame tmp;   *must list frame dataset first, then tmp;
ERROR: Variable CauseDeathProxy has been defined as both character and numeric.
180        by CauseDeathProxy
181         ;
182        run;

ZW would like to program IBIS-Q to check for variable type before it creates the data_frame.

Attachments (6)

SAS=1.txt (12.3 KB) - added by Lois Haggard 4 years ago.
SAS=1 result
SAS=2.txt (27.9 KB) - added by Lois Haggard 4 years ago.
SAS=2 result
SAS=3.txt (3.2 KB) - added by Lois Haggard 4 years ago.
SAS=3 result
NM_RateCrude100K_data_frame.def (7.4 KB) - added by Lois Haggard 4 years ago.
ibisq/qModules .DEF file
_Mort14.cfg (5.8 KB) - added by Lois Haggard 4 years ago.
ibisq/qModules .CFG file
UCOD variable.jpg (20.4 KB) - added by Lois Haggard 4 years ago.
Underlying Cause of Death (UCOD) is ICD-10, no decimal

Download all attachments as: .zip

Change History (9)

comment:1 Changed 4 years ago by Lois Haggard

More info (hopefully to clarify).

For user-defined queries, IBIS-Q/hi_iq_func creates categories labeled "1", "2", etc. for the user-defined categories. If the user-defined variable is character, the variable in the tmp file (e.g., the CauseDeathProxy? variable) is also character. Here are the tables I'm trying to merge:

---------------------------------
    1. TMP - numerator dataset

Cause
Death
Proxy    _TYPE_    _FREQ_    count

  .         0       1106      1106
  1         1        439       439
  2         1        667       667
---------------------------------
          2. Data Frame

                   Cause
                   Death
          count    Proxy

            0        1 
            0        2 
---------------------------------

Changed 4 years ago by Lois Haggard

Attachment: SAS=1.txt added

SAS=1 result

Changed 4 years ago by Lois Haggard

Attachment: SAS=2.txt added

SAS=2 result

Changed 4 years ago by Lois Haggard

Attachment: SAS=3.txt added

SAS=3 result

Changed 4 years ago by Lois Haggard

ibisq/qModules .DEF file

Changed 4 years ago by Lois Haggard

Attachment: _Mort14.cfg added

ibisq/qModules .CFG file

Changed 4 years ago by Lois Haggard

Attachment: UCOD variable.jpg added

Underlying Cause of Death (UCOD) is ICD-10, no decimal

comment:2 Changed 4 years ago by Tong Zheng

Milestone: Unassigned2.3 - Testing
Owner: changed from ZW to Lois

comment:3 Changed 4 years ago by Lois Haggard

Resolution: Fixed
Status: newclosed
Note: See TracTickets for help on using tickets.