Help using Base SAS procedures

A problem w. PHREG.

Reply
New Contributor
Posts: 2

A problem w. PHREG.

Dear collegs, need help

A problem w. PHREG. are there any advice what does it mean

The last variable always gives no results. DF=0 and no other values.

The code is like

PROC PHREG data=AAA;

MODEL PHDAYS*DIH(1)=AGE SEX PCRE1 PCRE2 PCRE3 PCRE4 PCRE5 PCRE6/RL;

run;

very simple

data like   

The SAS System                         18:04 Friday, September 18, 2009 105

                                                                       Cumulative  Cumulative

                                          PCRE1   Frequency   Percent   Frequency    Percent

                                          ---------------------------------------------------

                                              0        800      83.3         800       83.3

                                              1        160      16.7         960      100.0

                                                                       Cumulative  Cumulative

                                          PCRE2   Frequency   Percent   Frequency    Percent

                                          ---------------------------------------------------

                                              0        803      83.6         803       83.6

                                              1        157      16.4         960      100.0

                                                                       Cumulative  Cumulative

                                          PCRE3   Frequency   Percent   Frequency    Percent

                                          ---------------------------------------------------

                                              0        807      84.1         807       84.1

                                              1        153      15.9         960      100.0

                                                                       Cumulative  Cumulative

                                          PCRE4   Frequency   Percent   Frequency    Percent

                                          ---------------------------------------------------

                                              0        804      83.8         804       83.8

                                              1        156      16.3         960      100.0

                                                                       Cumulative  Cumulative

                                          PCRE5   Frequency   Percent   Frequency    Percent

                                          ---------------------------------------------------

                                              0        802      83.5         802       83.5

                                              1        158      16.5         960      100.0

                                                                       Cumulative  Cumulative

                                          PCRE6   Frequency   Percent   Frequency    Percent

                                          ---------------------------------------------------

                                              0        784      81.7         784       81.7

                                              1        176      18.3         960      100.0

THE RESULT IS

The PHREG Procedure

                                Data Set: WORK.AAA

                                Dependent Variable: PHDAYS    RANK FOR VARIABLE HDAYS

                                Censoring Variable: DIH

                                Censoring Value(s): 1

                                Ties Handling: BRESLOW

                                                       Summary of the Number of

                                                       Event and Censored Values

                                                                                  Percent

                                                Total       Event    Censored    Censored

                                                  959         207         752       78.42

                                                Testing Global Null Hypothesis: BETA=0

                                              Without        With

                               Criterion    Covariates    Covariates    Model Chi-Square

                               -2 LOG L       2745.091      2694.626      50.465 with 7 DF (p=0.0001)

                               Score              .             .         52.443 with 7 DF (p=0.0001)

                               Wald               .             .         48.693 with 7 DF (p=0.0001)

                                               Analysis of Maximum Likelihood Estimates

                                                                                        Conditional Risk Ratio and

                                                                                           95% Confidence Limits

                              Parameter      Standard       Wald          Pr >           Risk

         Variable    DF        Estimate        Error     Chi-Square    Chi-Square       Ratio       Lower       Upper    Label

         AGE          1        0.011676       0.00798       2.14021        0.1435       1.012       0.996       1.028    AGE

         SEX          1        0.175988       0.15395       1.30686        0.2530       1.192       0.882       1.612    SEX

         PCRE1        1       -0.830596       0.23520      12.47090        0.0004       0.436       0.275       0.691

         PCRE2        1       -1.311773       0.28412      21.31581        0.0001       0.269       0.154       0.470

         PCRE3        1       -0.870943       0.24467      12.67077        0.0004       0.419       0.259       0.676

         PCRE4        1       -0.774639       0.23232      11.11825        0.0009       0.461       0.292       0.727

         PCRE5        1       -0.039880       0.19120       0.04351        0.8348       0.961       0.661       1.398

         PCRE6        0               0             .             .         .            .           .           .

Attachment
Super User
Posts: 17,759

Re: A problem w. PHREG.

Is PCRE a categorical variable with 6 levels?

If so, then your model is overspecified and you need only 5 of the levels and the 6th is the reference level.

New Contributor
Posts: 2

Re: A problem w. PHREG.

>Is PCRE a categorical variable with 6 levels?

Yes it is.

But it is separated in to 6 separate vars with vals 0 or 1.

>If so, then your model is overspecified and you need only 5 of the levels and the 6th is the reference level.

If I leave only 5 vars the problem is solved. You are wright.

Thanks.


Trusted Advisor
Posts: 2,113

Re: A problem w. PHREG.

Consider using the CLASS statement for situations like this; it addresses the overspecification issues for you.

Ask a Question
Discussion stats
  • 3 replies
  • 156 views
  • 4 likes
  • 3 in conversation