Programming the statistical procedures from SAS

Random characters in PHREG output

Reply
Frequent Contributor
Posts: 80

Random characters in PHREG output

Has anyone else experienced this issue and/or found a solution?

When producing the output (either listing, ODS PDF, ODS HTML), I get stray random characters at the end of some variable values.  It happens with all output destinations, whether just that desitination or at the same time as the others.  It seems to affect only formatted variables or character variables.  The characters are no the same each time.  I can run back-to-back the exact same code and get different random characters are the end of the variable values  Here is an example:

proc pHReg data = aq alpha = 0.05 simple;

format raceOWCd marrieCd yesNo.;

class raceOWCd (ref = 'No' order = internal param = ordinal)

ethnicCd (ref = '2' order = internal param = ordinal)

eduCd (ref = '4' order = internal param = ordinal)

marrieCd (ref = 'No' order = internal param = ordinal)

q2_2a (ref = 'Decrease' order = internal param = ordinal)

q2_3 (ref = 'Never' order = internal param = ordinal)

q2_5 (ref = 'Never' order = internal param = ordinal)

q2_7 (ref = 'No' order = internal param = ordinal)

q3_1a (ref = 'No' order = internal param = ordinal)

q3_8 (ref = 'Never' order = internal param = ordinal)

q3_9 (ref = 'No' order = internal param = ordinal);

model stDayLU*discTrCd(0) = raceOWCd ethnicCd eduCd marrieCd q2_2a q2_3 q2_5 q2_7 q3_1a q3_8 q3_9 q3_11 / riskLimits alpha = 0.05 ties = exact;

run;

The output includes the following.  The last variable clipped has a format in the dataset itself.

                                        Analysis of Maximum Likelihood Estimates

                                       Parameter      Standard                                  Hazard      95% Hazard Ratio

      Parameter                 DF      Estimate         Error    Chi-Square    Pr > ChiSq       Ratio      Confidence Limits

      raceOWCd  Yes ˆo÷        1       0.15007       0.35380        0.1799        0.6714        .           .           .

      ethnicCd  2                1      -0.14444       0.45423        0.1011        0.7505        .           .           .

      eduCd     2                1      -0.25647       0.46528        0.3038        0.5815        .           .           .

      eduCd     3                1      -0.04013       0.46556        0.0074        0.9313        .           .           .

      eduCd     4                1       0.11524       0.45641        0.0638        0.8007        .           .           .

      marrieCd  Yes èÙQ        1      -0.31178       0.38700        0.6490        0.4205        .           .           .

      q2_2a     No change        1      -0.89605       0.42731        4.3972        0.0360        .           .           .

      q2_2a     Increase         1      -0.46923       0.63492        0.5462        0.4599        .           .           .

      q2_3      Sometimes        1       1.17890       0.39634        8.8474        0.0029        .           .           .

      q2_3      Always           1      -1.74453       1.09448        2.5406        0.1110        .           .           .

      q2_5      Sometimes        1      -0.14679       0.38059        0.1488        0.6997        .           .           .

      q2_5      Always           1       0.47530       0.53165        0.7992        0.3713        .           .           .

      q2_7      Yes              1      -0.10795       0.45640        0.0559        0.8130        .           .           .

      q3_1a     Yes       ÿÿ     1       0.23051       0.38503        0.3584        0.5494        .           .           .

The odd thing is that if I replace the two formatted variables with actual character variables, I still get odd results.

               Analysis of Maximum Likelihood Estimates

                               Parameter                 Label

                               raceOW    Yes èr÷         Flag: Only White Race Yes

                               ethnicCd  2               Ethnicity Code 1

                               eduCd     2               Highest Level of Education Code 1

                               eduCd     3               Highest Level of Education Code 2

                               eduCd     4               Highest Level of Education Code 3

                               married   Yes ˜›÷         Flag: Currently Married Yes

                               q2_2a     No change       Q2.2a: Change in sexual pleasure No change

                               q2_2a     Increase        Q2.2a: Change in sexual pleasure Increase

                               q2_3      Sometimes       Q2.3: Feel CVR during sex Sometimes

                               q2_3      Always          Q2.3: Feel CVR during sex Always

                               q2_5      Sometimes       Q2.5: Partner feel CVR during sex Sometimes

                               q2_5      Always          Q2.5: Partner feel CVR during sex Always

                               q2_7      Yes             Q2.7: Remove CVR before sex Yes

                               q3_1a     Yes       ÿÿ    Q3.1a: Previous tampon use Yes

Trusted Advisor
Posts: 2,114

Random characters in PHREG output

This may be worth opening a track with tech support.

However, I suspect that these characters are not "random" but are non-printing characters in the font from the data input stream that PHREG is trying to render.  You can potentially debug this by looking at the input data with a hex editor.

Doc Muhlbaier

Duke

Ask a Question
Discussion stats
  • 1 reply
  • 139 views
  • 0 likes
  • 2 in conversation