BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
SeaMoon_168
Obsidian | Level 7

I am not sure if proc phreg would count any observations with follow-up time = 0. Shall I change the follow-up time = end date - start date + 1 (Not follow-up time= end date - start date) so that even the start and end date are the same, the follow up time is 1 instead of 0.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @SeaMoon_168,

 

I assume that you will use the "follow-up time" variable as the "response" variable in a MODEL statement of the first form (see documentation), i.e.

MODEL response <*censor (list)= effects </ options>;

In this case only negative or missing response values would be excluded from the analysis, whereas response=0 is no problem. Shifting all response values in the analysis dataset by a constant positive amount (e.g. response=response+100; in a DATA step) should leave all statistics in the PROC PHREG output unchanged and thus confirm that any zeros (before the shift) had no special bearing on the results.

View solution in original post

3 REPLIES 3
FreelanceReinh
Jade | Level 19

Hello @SeaMoon_168,

 

I assume that you will use the "follow-up time" variable as the "response" variable in a MODEL statement of the first form (see documentation), i.e.

MODEL response <*censor (list)= effects </ options>;

In this case only negative or missing response values would be excluded from the analysis, whereas response=0 is no problem. Shifting all response values in the analysis dataset by a constant positive amount (e.g. response=response+100; in a DATA step) should leave all statistics in the PROC PHREG output unchanged and thus confirm that any zeros (before the shift) had no special bearing on the results.

SeaMoon_168
Obsidian | Level 7

Thank you for your advice. However, I am still not sure if the model will not include any observations with follow up time = 0 ? 

 

 

FreelanceReinh
Jade | Level 19

@SeaMoon_168 wrote:

Thank you for your advice. However, I am still not sure if the model will not include any observations with follow up time = 0 ?


Do you see a note like this in the log?

NOTE: n observations were deleted due either to missing or invalid values for the time, censoring, frequency or explanatory variables or to invalid
      operations in generating the values for some of the explanatory variables.

 

Or a difference between the "Number of Observations Read" and the "Number of Observations Used" in the PROC PHREG output (section "Model Information") due to zeros in the follow-up times?

 

Or a difference in the model statistics after shifting the follow-up times as I suggested?

 

Or are you using the "Counting Process Style of Input"? That is, the second form of the MODEL statement:

MODEL (t1, t2)<*censor(list)= effects </ options>;

In the latter case, yes, observations with t1=t2=0 would be excluded because PROC PHREG uses semiclosed time intervals (t1, t2] and (0, 0] equals the empty set.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 486 views
  • 1 like
  • 2 in conversation