Programming the statistical procedures from SAS

ProcTRAJ: OUSTAT not correct time scale in graph

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

ProcTRAJ: OUSTAT not correct time scale in graph

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');


Accepted Solutions
Solution
‎07-18-2016 11:57 AM
New Contributor
Posts: 3

Re: ProcTRAJ: OUSTAT not correct time scale in graph

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


All Replies
Super User
Posts: 18,997

Re: ProcTRAJ: OUSTAT not correct time scale in graph

You'll have to check the macro code. 

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

New Contributor
Posts: 3

Re: ProcTRAJ: OUSTAT not correct time scale in graph

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.
SAS Super FREQ
Posts: 3,616

Re: ProcTRAJ: OUSTAT not correct time scale in graph

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/

 

Solution
‎07-18-2016 11:57 AM
New Contributor
Posts: 3

Re: ProcTRAJ: OUSTAT not correct time scale in graph

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!

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 207 views
  • 0 likes
  • 3 in conversation