BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Cruise
Ammonite | Level 13

My patients enrolled in the program from the birth through their 60 months and have received a treatment with various durations (no treatment, upto 3 mo, upto 6mo, upto 9mo, upto 12 mo and beyond 12mo). Now I'd like to assess the changes in trend of a disease rate among them over time where treatments durations is the exposure. I'd also like to stratify the analysis by race and age. And choose no treatment groups=0 as a reference.

 

My questions are:

1. Using proc glm make sense here? am I on the right track at least?

2. How to define trt_types=0 as a reference group in the model?

 

proc import datafile="...\support.csv"
out=data
dbms=csv replace;
run;

proc glm data=data;
class trt_types year;
model rate=trt_types year race age/solution;
run;

 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

As @ballardw said

 

If year is a calendar year you probably want to get a years-since-treatment or years-of-treatment variable for the model.

 

To get a trend, you would not make YEAR a CLASS variable.

--
Paige Miller

View solution in original post

6 REPLIES 6
ballardw
Super User

I think you may be looking for

class trt_types ref='0' year;

 

if the variable has a format assigned then the ref='value' has to be the FORMATTED value

 

I'm not sure that you want year as a class variable though if your test for trend is anything such as the slope the line (parameter for year) assuming year is an interval  (years since treatment) and not calendar year. If year is a calendar year you probably want to get a years-since-treatment or years-of-treatment variable for the model.

Cruise
Ammonite | Level 13

@ballardw, @PaigeMiller

 

Thank you so much for your precious time!

 

Subjects participated in the program from the birth through their 60 months. Majority of them have multiple measurements within each year and the only last measurement of each year was retained. ‘Year’ in my data is the year of birth which also means a cohort year. I created another derived variable "survey_yr" which is the year of measurement using (survey _yr=year+age). I don't know yet how to account for same kids' measurement information found across different measurement years. I hope below image helps what I'm trying to explain here.

My research question is: what is the time trend in the disease rate over time among subjects received different treatment exposure taking no-treatment group as a reference. I also stumbled across age-year-cohort analysis method. But I was also wondering if I can do quick analysis using glm or glimmix as PaigeMiller suggested ignoring the nature of repeated measurement and the effect of birth year.

I'm sorry, if it's only confusing!   

year_survey_yr.png

 

 

 

Cruise
Ammonite | Level 13
I realized that my original post reflects my rush to shortcut to do modeling for preliminary analysis and my second post as a response to your questions reflect my data story accurately. I love discussing with you guys. It helps a lot to understand what needs to be done.
PaigeMiller
Diamond | Level 26

Using GLM assumes that the response variable errors are normally distributed. If they are not, you either have to do some transformation to make the errors normally distributed, or use something like PROC GLIMMIX.

--
Paige Miller
PaigeMiller
Diamond | Level 26

As @ballardw said

 

If year is a calendar year you probably want to get a years-since-treatment or years-of-treatment variable for the model.

 

To get a trend, you would not make YEAR a CLASS variable.

--
Paige Miller
Cruise
Ammonite | Level 13
Would you agree that "years of treatment" variable tells the same story as my trt_types variable? Subjects had received the same treatment but with varying durations where trt_types0=no treatment, trt_types1=treatment continued up to 3 months, trt_types2=up to 6 months, trt_types3=up to 9 months, trt_types4=up to 12 months, trt_types5=longer than 12 months.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 6 replies
  • 2205 views
  • 0 likes
  • 3 in conversation