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

I'm using this syntax to study depression profiles over time, however when I try to view my findings in a graph I notice that the OS is not displaying the same time scale I entered time as a function of the different weeks (0 for 0 weeks, 0.6 for 6 weeks, 2.2 for 22 weeks and 5.0 for 5 weeks), yet the graph shows 0.0, 2.00, 4.00, 6.00 etc. What am I doing wrong?

 

proc traj data=tp2 out=of outstat=os outplot=op outest=oe;
var T0BDIMEAN--T3BDIMEAN;   
indep T0--T3 ;    
MODEL CNORM ;    
MIN 0;           
MAX 63;  // **BDI total score**         
NGROUPS 3;       
ORDER 1 1 1 ;    
ID ID;
RUN;
%TRAJPLOT (op, os,'Depression Trajectories', ' ', 'Depression', 'Time');

1 ACCEPTED SOLUTION

Accepted Solutions
JLamothe
Fluorite | Level 6

Hi,

 

I actually found the answer. I had originally coded my different time points as 0.00, 0.60, 2.2 and 5.00 for the number of weeks divided by 10. I recoded the values to 0.00, 6.00, 22.00 and 50,00 for the actual number of weeks and it fixed the problem. Maybe the graphic option has a harder time with decimals. I still don't know what the problem was but I found the solution. If this happens to you try recoding the time points into another format.

 

Thanks everyone!

View solution in original post

4 REPLIES 4
Reeza
Super User

You'll have to check the macro code. 

This isn't a SAS proc...which version are you using?

JLamothe
Fluorite | Level 6
Rick_SAS is correct. ProcTRAJ was developped by a user but is used quite frequently. I just don't understand why the time scale is radically different.
Rick_SAS
SAS Super FREQ

For anyone who is not aware of PROC TRAJ, it is a user-supplied procedure. For documentation and download, see

http://www.andrew.cmu.edu/user/bjones/

 

JLamothe
Fluorite | Level 6

Hi,

 

I actually found the answer. I had originally coded my different time points as 0.00, 0.60, 2.2 and 5.00 for the number of weeks divided by 10. I recoded the values to 0.00, 6.00, 22.00 and 50,00 for the actual number of weeks and it fixed the problem. Maybe the graphic option has a harder time with decimals. I still don't know what the problem was but I found the solution. If this happens to you try recoding the time points into another format.

 

Thanks everyone!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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