Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Nam-D'Agostino Test of calibration [ An extension of Hosmer Lemeshow t...

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 06-21-2018 04:03 AM
(3294 views)

Hello community,

I really request for assistance. I want to calculate the Nam-D'Agostino Test which is an extension of Hosmer Lemeshow test adapted to survival data.

Attached to this message is the formula I am supposed to use to calculate this statistic but I dont know how to write the code and I have not come across any code on internet for almost 3 month of searching. Community , I request for your assistance.

Thank you in advance.

4 REPLIES 4

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you Mr. Rick for the article about calibration plots. I have followed it and was able to get the concept for obtaining calibration plot using the Phreg procedure. However, I would be glad if am also assisted to find a way to calculating the associated Chi Square and P values using this formula modified by Nam-D'Agostino.

There are other people who have tried to search for the same calculating on this forum but they had no replies about this calculation, so i failed to get any ideas about how the coding should be done.

I will be glad to receive more additional assistance from you and other community advisors.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hello Rick,

This is what I have tried out so far.

/* USING PHREG PROCEDURE TO SAVE PREDICTED PROBABILITIES FROM THE COX MODEL */

Proc phreg data=Stone1.Development;

class SEX(ref='2') AGE (ref='1') SMOKING(ref='1') DRINKING(ref='1') CHOLESTEROL(ref='1') TRIGLYCERIDES(ref='1') OBESITY(ref='1') GLUCOSE(ref='1') SBP(ref='1');

model Years * Censor (0)=Sex AGE SMOKING DRINKING CHOLESTEROL TRIGLYCERIDES OBESITY GLUCOSE SBP/ rl;

output out=OutData Survival=PredProb; /* Saving predicted probabilities in data set */

run;

/* IDENTIFICATION OF DECILES OF PREDICTED PROBABILITIES*/

Proc rank data=OutData out=Decile groups=10;

var PredProb;

ranks Decile;

run;

/* COMPUTATION OF THE MEAN PREDICTED PROBABILITIES AND THEIR CONFIDENCE INTERVALS*/

proc means data=Decile noprint;

class Decile;

types Decile;

var PredProb;

output out=MeanDecileOut mean= PredProbMean

lclm=PredProbLower uclm=PredProbUpper;

run;

*/Desription of Variables in my data desription*/

*/Years=Varibale for time ot event or follow up time for each indivividual in the cohort*/

*/Censor=Censoring variable with censor(0) representing censored participant and Censor(1) representing participants who expereinced the outcome of interest*/

*/PredProb is the variable containing individual Survival probabilties that I obtained from the a multivariable Cox proportional Hazards model as seen above/*

*/Desription of Variables in Nam-D'Agostino Test formula*/

Below is the formula to calculate the statistics for each decile.

[KMg(t)- p(t)g]Squared *ng /p(t)g(1-p(t)g)

Then summation for all deciles to get the overal statistcis for the model.

Where

*/KMg(t) represents the failure probability in g-th decile at time t*/

*/ p(t)g is the mean predicted probability of failure for subjects in g-th decile using any survival modelling technique [ I am using Cox model]/*

*/ng is number of observations in a group g/*

Thank you RICK for your continued assistance. Will be glad to receive your assistance again.

Are you ready for the spotlight? We're accepting content ideas for **SAS Innovate 2025** to be held May 6-9 in Orlando, FL. The call is **open **until September 25. Read more here about **why** you should contribute and **what is in it** for you!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.