Community talk about communities.sas.com. Meta!

How to calculate brier score for cox model

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 10
Accepted Solution

How to calculate brier score for cox model

Hello community, I have tried to look for any SAS  material about computing brier score in survival analysis but I haven't been able to find any useful material. 

 

I request for help on how to compute brier score for cox model.

 

Thanks in advance


Accepted Solutions
Solution
‎04-29-2018 05:14 AM
Esteemed Advisor
Posts: 5,528

Re: How to calculate brier score for cox model

Posted in reply to Joseph2010

Using the introductory example for proc phreg documentation and my limited understanding of the Wikipédia page , The calculation of the Brier score should go like this:

 

/* The following DATA step creates the data set Rats, which contains the 
variable Days (the survival time in days), the variable Status (the 
censoring indicator variable: 0 if censored and 1 if not censored), 
and the variable Group (the pretreatment group indicator). 
*/

data Rats;
   label Days  ='Days from Exposure to Death';
   input Days Status Group @@;
   datalines;
143 1 0   164 1 0   188 1 0   188 1 0
190 1 0   192 1 0   206 1 0   209 1 0
213 1 0   216 1 0   220 1 0   227 1 0
230 1 0   234 1 0   246 1 0   265 1 0
304 1 0   216 0 0   244 0 0   142 1 1
156 1 1   163 1 1   198 1 1   205 1 1
232 1 1   232 1 1   233 1 1   233 1 1
233 1 1   233 1 1   239 1 1   240 1 1
261 1 1   280 1 1   280 1 1   296 1 1
296 1 1   323 1 1   204 0 1   344 0 1
;

proc phreg data=Rats plot=none;
   model Days*Status(0)=Group;
   output out=ratsSurv survival=surv;
run;

proc sql;
select
    mean((status-(1-surv))**2) as BrierScore
from ratsSurv;
quit;
PG

View solution in original post


All Replies
Solution
‎04-29-2018 05:14 AM
Esteemed Advisor
Posts: 5,528

Re: How to calculate brier score for cox model

Posted in reply to Joseph2010

Using the introductory example for proc phreg documentation and my limited understanding of the Wikipédia page , The calculation of the Brier score should go like this:

 

/* The following DATA step creates the data set Rats, which contains the 
variable Days (the survival time in days), the variable Status (the 
censoring indicator variable: 0 if censored and 1 if not censored), 
and the variable Group (the pretreatment group indicator). 
*/

data Rats;
   label Days  ='Days from Exposure to Death';
   input Days Status Group @@;
   datalines;
143 1 0   164 1 0   188 1 0   188 1 0
190 1 0   192 1 0   206 1 0   209 1 0
213 1 0   216 1 0   220 1 0   227 1 0
230 1 0   234 1 0   246 1 0   265 1 0
304 1 0   216 0 0   244 0 0   142 1 1
156 1 1   163 1 1   198 1 1   205 1 1
232 1 1   232 1 1   233 1 1   233 1 1
233 1 1   233 1 1   239 1 1   240 1 1
261 1 1   280 1 1   280 1 1   296 1 1
296 1 1   323 1 1   204 0 1   344 0 1
;

proc phreg data=Rats plot=none;
   model Days*Status(0)=Group;
   output out=ratsSurv survival=surv;
run;

proc sql;
select
    mean((status-(1-surv))**2) as BrierScore
from ratsSurv;
quit;
PG
Occasional Contributor
Posts: 10

Re: How to calculate brier score for cox model

Thank you very much for the assistance,. The solution works perfectly.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 267 views
  • 0 likes
  • 2 in conversation