turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- ProcTRAJ: OUSTAT not correct time scale in graph

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-13-2016 10:55 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-18-2016 11:57 AM

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!

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-13-2016 10:59 AM

You'll have to check the macro code.

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-13-2016 11:13 AM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-13-2016 11:00 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-18-2016 11:57 AM

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!