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');
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!
You'll have to check the macro code.
This isn't a SAS proc...which version are you using?
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/
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!
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.
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.