BookmarkSubscribeRSS Feed
guaguncher
Obsidian | Level 7

I have a research question where I wanted to investigate factors predicting a change in a severity score of a lung health indicator (let's call it Y). I have two measurements which are unequally spaced, with subjects having an average follow-up 7.7 years; but some subjects have a follow-up period of 5 years and others close 9 years. I have covariates that are 'fixed' (e.g. sex, race) and others that are collected at each of the two time points (e.g. bmi). 

 

My question is: how can I best model the outcome of interest Y?

 

If I am correct, I don't think I should worry about the co-variance structure in the model or 'random' time effects since I only have two time points. However, I think it is important to take into account that not all subjects have the same follow-up time (and perhaps treat time as continuous?).  

 

I have tried the following with SAS code, but here I treated time as a categorical variable (0/1) -- which I believe is not correct since not everyone has the same follow-up time. 

	proc mixed data=data_long;
			class id sex time; 
			model Y = time sex bmi time*bmi; 
			repeated time / type = un sub=id; 
			*lsmeans time*bmi;
	run;

 

2 REPLIES 2
Rick_SAS
SAS Super FREQ

I don't know the "best" way to model your data, but if you put TIME on the CLASS statement, the procedure will treat it as a categorical variable with the levels in the data. That likely means that the CLASS levels are not two, but are many.

 

See the MIXED doc for an example of continuous time. You can try removing that variable from the CLASS and REPEATED statements and see if the results make sense for your data

 

	proc mixed data=data_long;
			class id sex ; 
			model Y = time sex bmi time*bmi; 
			repeated / type = un sub=id; 
	run;

 

guaguncher
Obsidian | Level 7

I have a research question where I wanted to investigate factors predicting a change in a severity score of a lung health indicator (let's call it Y). I have two measurements which are unequally spaced, with subjects having an average follow-up 7.7 years; but some subjects have a follow-up period of 5 years and others close 9 years. I have covariates that are 'fixed' (e.g. sex, race) and others that are collected at each of the two time points (e.g. bmi). 

 

My question is: how can I best model the outcome of interest Y?

 

If I am correct, I don't think I should worry about the co-variance structure in the model or 'random' time effects since I only have two time points. However, I think it is important to take into account that not all subjects have the same follow-up time (and perhaps treat time as continuous?).  

 

I have tried the following with SAS code, but here I treated time as a categorical variable (0/1) -- which I believe is not correct since not everyone has the same follow-up time. 

	proc mixed data=data_long;
			class id sex time; 
			model Y = time sex bmi time*bmi; 
			repeated time / type = un sub=id; 
			*lsmeans time*bmi;
	run;

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 1068 views
  • 2 likes
  • 2 in conversation