BookmarkSubscribeRSS Feed
PeteMc
Calcite | Level 5

Hi Folks,

 

Trying to fit a nested (shared or joint) frailty model using Penalized Likelihood estimation on the hazard function. Dataset is a multi-year clustered RCT

 

Variables:

Treatment: 0-placebo, 1-Intervention

riv: 0-no exposure to illness, 1-exposure to illness

tte: time to event of exposure (days)

community: cluster id 

subject_id: participant id

year: study year {1,2,3,4}

 

At each year, participants across 36 communities (varying in size ~100 to 150 people) are followed from April to October, monitored for exposure to illness. For the most part subjects re-enroll each year , and Treatment remains the same for all years. Exposure variable (riv) is set 0 at the beginning of each year.

 

Each year I obtain the HR 95% CI from Analysis of Maximum Likelihood Estimates
with Sandwich Variance Estimate using 

 

proc phreg data=rivdata covs(aggregate) covm ;
id community;
model tte*riv(0)=Treatment /ties=EFRON rl;
by year;
run;

 

But would like to fit all years together and see HR 95% CI. The two approaches I have tried are -

 

One:

proc phreg data=rivdata covs(aggregate) covm ;

class community subject_id;

model tte*riv(0)=Treatment /ties=EFROM rl;
/* strata year; */
random community;
run;

 

Two:

proc surveyphreg data=rivdata;
class Treatment;

cluster community;

/* cluster community subject_id; */

model tte*riv(0)=Treatment /ties=EFRON rl;
hazardratio Treatment;

/* strata year; */
run;

 

Any help would be appreciated to get correct HR 95% CI for all years combined.  

 

I've tried frailtypack in R, package is unstable, even after being re-released Oct 20, 2020.

Thanks

2 REPLIES 2
SteveDenham
Jade | Level 19

What happens if you remove the BY year statement from your original code?  What about changing the RANDOM effect in your first PHREG statement to 

random community_year;

where community_year is created by concatenating the two variables?

 

One more thing - I am going to move this to the Analytics\Statistical Procedures community, where it should draw attention from people specifically knowledgeable about this.

 

SteveDenham

PeteMc
Calcite | Level 5
Thanks for quick replay SteveDenham.

Using your suggestion above, I get virtually same results as having.
random community;
strata year;

I need to reword my question - my explanation implies independence between years , need to adjust for repeated subject measures.

I'll reword my question and post in Analytics\Statistical procedures.

Thanks

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

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